ajaxorg/ace — Issue #615: Redraw required for editor to focus in Safari
Author: ellisonbg
Created: 2012-01-13 20:21:43+00:00
State: open

Hi, I am using github master of Ace and am dynamically hiding and showing the editor on the page. On Chrome and FF it works fine, but on Safari, when I show the editor and focus it, is appears disabled: there is no prompt and it looks like it doesn't have focus, the user can't type and the contents of the editor are hidden. Resizing the browser window or calling window.resizeBy(1,1) fixes the issue. Is there something that needs to be done when un-hiding the editor to activate/focus it.

Here is some of the code I am using to do this:

$('#fulledit_widget').show();
this.ace_editor.getSession().setValue(code);
this.ace_editor.focus();
window.resizeBy(0,1);

Is there a better way?