I'm using tinyMCE Community latest version (6.8.2) in inline mode, and I've attached an onblur handler like this:
ed.on('blur', function(e) {doblur(ed);} );
All seems to work well, when I do normal edits: I click in the editor to focus it, do my edits and then click outside, and in that moment my doblur() function gets called and does its things (aka saves the edits server side).
But... If i click on an editor which has already a value (whether because it had it in the beginning or because I already edited it) and delete the value, as soon as I delete the last char of the content... The blur event gets fired, even if the cursor is still flashing in the editor, and in reality no change in focus has occurred.
Also, in that case, when my doblur() function checks the editor content via ed.getContent(), the last char is still in the editor, but onscreen that char is gone, and if that last char was the only char present in the editor at the beginning, also ed.isDirty() returns false, as the editor thinks it still has that lone char in its content, and then it thinks nothing has been changed from the original value!
Anyone has some clue as to what might be happening?
Here:
https://www.atipica.it/clienti/tinyMCE_blur/blur_bug.html
A working example of the bug, in the console you get messages when the editor is focused and when it's blurred, showing the bug, especially in the editor which contains a single "g" char.