3
votes

When editing a div using the inline mode of tinyMCE, clicking outside of the editor will deactivate it (hide the toolbar, and basically return the div to "normal"). This is good.

There are some cases when the editor stays where it is even after losing focus:

  • Hitting tab will make the editor lose focus (and bring focus to the address bar, for example), but the editor and toolbar stay there.
  • Clicking on an element whose click event is captured by another script (like a Jquery-UI-Sortable element) will take focus away from the editor but keep the editor there.

In both cases, I have to click the body of the editor and then click out of it to get it to deactivate and disappear.

Is there a way to tell the inline editor instance to deactivate?

1
Seems like a legitimate TinyMCE bug. - alxndr
Did you find a solution? - aggsol
I don't think I did but to be honest it was so long ago that I don't remember. The site that was for has since been rebuilt. - Jason Galuten

1 Answers

0
votes

I can try below ways.

  1. Remove class from tinymce editor. $(editor.bodyElement).removeClass("mce-edit-focus")

  2. One can define dummy(no action) button in HTML page and call onclick of that button.

    document.getElementById("noAction").click();