[Webkit-unassigned] [Bug 41358] New: Selection offset does not update when DOMCharacterDataModified fires
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 29 09:57:40 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=41358
Summary: Selection offset does not update when
DOMCharacterDataModified fires
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Mac OS X 10.5
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: HTML Editing
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: me at elv1s.ru
Created an attachment (id=60031)
--> (https://bugs.webkit.org/attachment.cgi?id=60031)
Reduction
See reduction.
The problem is, both range.startOffset and range.endOffset have previously selected offset, while range.startContainer and range.endContainer are pointing to the actual (ie new) nodes. It makes impossible (?) to get actual selection within DOMCharacterDataModified event.
I've looked to the specs [1], [2] and didn't find any clarification what UA should actually do. But what they do now is not useful at all.
I compared Firefox 3.6.6 with WebKit. Firefox behaves slightly less wrong:
1) When pressing delete or backspace key, range.startOffset and range.endOffset actually match to the current selection
2) getSelection().isCollapsed is always false, no matter what was selected before
[1]: http://www.w3.org/TR/DOM-Level-3-Events/#event-type-DOMCharacterDataModified
[2]: http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list