Bug
(Could it be related to #1192?)
Should be able to select the text with the void inline node just like in Chrome
I investigated this and it might actually be a bug in Firefox's window.getSelection() itself.
Firefox has a problem dealing with contentEditable=true inside contentEditable=false inside contentEditable=true.
So... one way to fix the problem is to avoid switching contentEditable twice. If I remove contentEditable from the spacer element in void.js (line 72), it fixes the problem.
However, because there are two tests that check how void element is rendered, and changing this would make the tests fail. But I check the demos and they seem to work fine. How is this "spacer" being used and would removing contentEditable break anything? Since this is void node, I'm not expecting user to be able to edit the content (if I understand void node correctly)
I believe that this may be fixed by https://github.com/ianstormtaylor/slate/pull/3093, which has changed a lot of the logic in Slate and slate-react especially. I'm going to close this out, but as always, feel free to open a new issue if it persists for you. Thanks for understanding.
Most helpful comment
So... one way to fix the problem is to avoid switching
contentEditabletwice. If I removecontentEditablefrom the spacer element invoid.js(line 72), it fixes the problem.However, because there are two tests that check how void element is rendered, and changing this would make the tests fail. But I check the demos and they seem to work fine. How is this "spacer" being used and would removing
contentEditablebreak anything? Since this is void node, I'm not expecting user to be able to edit the content (if I understand void node correctly)