WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
ASSIGNED
130748
When a node is removed and that changes selection, we don't notify editor client, and don't fire selectionchange event
https://bugs.webkit.org/show_bug.cgi?id=130748
Summary
When a node is removed and that changes selection, we don't notify editor cli...
Alexey Proskuryakov
Reported
2014-03-25 15:26:37 PDT
When a node is removed and that changes selection, we don't notify editor client, and don't fire selectionchange event.
Attachments
WIP patch
(6.41 KB, patch)
2014-03-26 09:56 PDT
,
Alexey Proskuryakov
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2014-03-26 09:56:45 PDT
Created
attachment 227855
[details]
WIP patch Attaching a WIP patch. There are still many big issues that may make this impractical for now: - The patch causes multiple crashes in editing code. - It only fixes notifications when a removed node contains one of the endpoints, not when a node is removed in the middle of selection. - It doesn't fix anything when a node is added in the middle of selection. - It almost certainly doesn't fix anything when text content of nodes is manipulated. - I haven't even tested what IE does in any of these cases. Maybe it only fires selectionchange event when selecting manually? One way or another, it's certainly a problem that we don't cleanly track selection and composition changes in WebCore.
Alexey Proskuryakov
Comment 2
2014-03-26 11:50:27 PDT
Tested, and IE 11 is pretty bad about dispatching selectionchange for programmatic changes. I got the event when removing a contenteditable div with a range selection inside, but not when removing nodes from a selection. But we need to track DOM changes somehow to stay in sync with input methods.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug