Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Inline editor: Issues when the root element is a button #5098
What is the current behavior? Describe the bug
Issue 1 seems to be resolved on Chrome by making a child span the root element, but this does not resolve issues 2 and 3 and completely breaks editing on Firefox. See http://fiddle.tinymce.com/LNgaab
What is the expected behavior?
While issues 2 and 3 could arguably be the responsibility of the implementing developer, issue 1 is definitely a TinyMCE bug. Fixes for issues 2 and 3 would be nice as well - if and when a button is editable I would never expect it to be actually used as a button.
Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE?
TinyMCE 5 Cloud (stable)
Ah! Thank you @lnewson, I was clearly searching too narrowly.
Points 2 & 3 I have mitigated in my own code for now, with a preventDefault and an insert. Though it may be worth a discussion as to whether this should be handled by default (I'm sure other elements could benefit from it).