getSelection().anchorNode returns wrong node after executing document.execCommand(..)
Categories
(Core :: DOM: Editor, defect)
Tracking
()
People
(Reporter: jimmy, Unassigned)
Details
Steps to reproduce:
Please go to https://jsfiddle.net/cjnm378d/
Double click on a word in the editable div to turn a word BOLD. When document.execCommand("bold") is applied, other browsers will update the selection to become the text node within the newly created bold tag. But not Firefox. Firefox moves the selection to the text node before the bold tag.
Actual results:
Firefox does not update selection to text node within newly created item but instead keeps it on the text node BEFORE the bold tag.
Expected results:
Firefox should update the selection to the text node within the newly created bold tag like other browsers do.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Toolkit::Application Update' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 2•2 years ago
|
||
Managed to reproduce the issue on Window 10 x64, macOS 11.6 and on Ubuntu 20.04 x64.
Comment 3•2 years ago
|
||
An editor incompatibility seems a little worse than S4 to me, but maybe I'm wrong.
Comment 4•2 years ago
|
||
I'm currently trying to fix this in bug 1792386.
Updated•2 years ago
|
Description
•