ajaxorg/ace — Issue #503: 'change' event fires when setting Ace programmatically
Author: matthewdl
Created: 2011-11-14 03:06:35+00:00
State: open

For code like this:

editor.getSession().on('change', function() {
// Do something
});

I would expect this event to only fire when there's a user interaction. However, I've found that it fires when I set the value of the editor programmatically, which is not consistent with something like, say, the DOM. (If you add a 'change' event listener for an input field, it will not fire if we set the value with JavaScript.)

Can this be fixed, and is there a workaround or a different event that fires when the value of the editor has updated, but not programmatically?