Just started using the Ace editor (http://ace.ajax.org) and although it works fine on a regular editor, as soon as I put it inside a jquery-ui dialog that has the ‘modal: true’ option, I can do everything except input text. That is, I can select, use ctrl combinations, and even DELETE text, but I can’t insert letters.
Any idea how that ‘modal: true’ option might interfere with regular character insert? Is there a ‘stopPropagation’ function that might stop the key-stroke from getting to the editor?
The problem was that jquery-dialogs look for a z-index on the target element (in this case, the textarea of the Ace editor) before allowing the event to continue. At the time of writing, this is where they do this check:
jquery.ui.dialog.js starting on line 685.
There are several ways to handle this, but I found the easiest was to set the z-index of Ace’s textarea to a really high value. Here’s the part of the CSS where I did this:
ace_uncomplessed.js starting on line 16211.