Re: [ace] Ace Edit does not refresh after setValue change

8,059 views
Skip to first unread message

Harutyun Amirjanyan

unread,
May 14, 2013, 4:57:35 AM5/14/13
to ace-d...@googlegroups.com
Hi

> When I use setValue: editor.getSession().setValue("new code here");

this, should work, without any additional steps
see http://jsbin.com/ojijeb/108/edit

could you make an example page that reproduces the problem?

Qiuyan Lin

unread,
Jul 16, 2013, 1:14:47 AM7/16/13
to ace-d...@googlegroups.com
I had same problem. 
After I use setValue, the display is not refreshes but editor.getValue() is right. 
Later, I found that editor is in a dialog and the dialog is closed when setting new value. 
So, I add editor.setValue(editor.getValue) after the dialog opened. The problem has been solved. 

在 2013年5月12日星期日UTC+8上午10时58分32秒,Peter Giroux写道:
Hi

The following has been tested on both FireFox and Chrome.

When I use setValue: editor.getSession().setValue("new code here");

The display is not refreshes. 

What I figured out so far:
  1. the setValue did work and the information is changed.
  2. Ace Editor needs to be clicked on and then the "enter" key pressed for it to display.
  3. the.resize() option does not get the content of the Ace Editor to refresh to what is changed.
I did look in the documentation for a refresh()/update() command but seems the be none.

Any Help would be great.

Andrey Stegno

unread,
Oct 21, 2013, 1:47:38 PM10/21/13
to ace-d...@googlegroups.com
Not a solution for my case. I set content when ace editor in invisible div. I see change only when I put cursor on it. 

Harutyun Amirjanyan

unread,
Oct 21, 2013, 3:21:23 PM10/21/13
to ace-d...@googlegroups.com
you should call editor.resize() after changing size or visibility of the div
> --
> You received this message because you are subscribed to the Google Groups
> "Ajax.org Cloud9 Editor (Ace)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ace-discuss...@googlegroups.com.
> To post to this group, send email to ace-d...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ace-discuss.
>
> For more options, visit https://groups.google.com/groups/opt_out.

Qing Sun

unread,
Nov 3, 2014, 11:42:41 PM11/3/14
to ace-d...@googlegroups.com
I met the same problem. The value will not change until mouse click.
Any body help?

Harutyun Amirjanyan

unread,
Nov 4, 2014, 11:22:09 AM11/4/14
to ace-d...@googlegroups.com
do you call editor.resize() ? if that doesn't help please make a page demonstrating the bug

iDeBugger Freeman

unread,
May 27, 2015, 9:52:43 AM5/27/15
to ace-d...@googlegroups.com
Look at this: http://jsbin.com/pihagodaja/4/edit

For bug reproduce:
1. Press "Hide" button
2. Press "Set value" button
3. Press "Show" button
4. Text in Ace is still old!
5. Click in Ace area — text is changed!

Video: http://files.idebugger.ru/2015-05-27_16-50-06.mp4

вторник, 4 ноября 2014 г., 19:22:09 UTC+3 пользователь Harutyun Amirjanyan написал:

Harutyun Amirjanyan

unread,
May 27, 2015, 9:55:57 AM5/27/15
to ace-d...@googlegroups.com
@iDeBugger 

You need to call editor.resize() after calling $('#e1wrap').show();
see https://github.com/ajaxorg/ace/issues/2497#issuecomment-102633605
Reply all
Reply to author
Forward
0 new messages