Open kgrosvenor opened 5 years ago
Firefox has a bug with contentEditable inside a contentEditable elements. You can turn contentEditable to true in selectTemplate hook. ie:
selectTemplate: () => {
return <span contenteditable="true"> test </span>
}
This is more of a hack and not a proper sol.
@robin-philip-thomas doesn't work, Is there any scope for a proper solution for Firefox?
I'm aware of this bug, unfortunately @robin-thomas-e1391 is right, this is a bug in Firefox. The only workaround is to be aware of the template syntax you've selected and detect cursor position around this element. https://stackoverflow.com/questions/2239821/backspace-doesnt-delete-inner-html-tags-of-a-contenteditable-div-in-firefox
Due to the flexibility of custom templates, I don't think that we can do this for you.
Thanks for the responses, guess we'll have to hope Firefox come up with the content editable fix at some point, will see what i can do in the mean time with this ^
How can we reproduce this bug?
What did you expect to happen?
What happened instead?
Link (jsfiddle/plunkr/codepen) or Screenshot: You can fork this Codepen as a base for reproducing your issue: https://codepen.io/mrsweaters/pen/OxxdWv?editors=1010#0