[Webkit-unassigned] [Bug 115517] Selection in non-editable content gets stuck when approaching an editable node

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 6 14:06:08 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=115517





--- Comment #9 from Ryosuke Niwa <rniwa at webkit.org>  2013-05-06 14:04:32 PST ---
(From update of attachment 200772)
View in context: https://bugs.webkit.org/attachment.cgi?id=200772&action=review

> Source/WebCore/editing/VisiblePosition.cpp:465
> +            Node* previousNonEditable = lowestRoot->previousSibling();
> +            while (previousNonEditable && previousNonEditable->rendererIsEditable())
> +                previousNonEditable = previousNonEditable->previousSibling();

We either want to call Position::upstream or do something like positionBeforeNode(lowestEditableAncestor(pos.deepEquivalent().deprecatedNode())).previous().
Walking the DOM manually like this is almost never right. e.g. this fails if we had a structure like
<div contenteditable><div><div contenteditable=false></div></div><div contenteditable=true>start here</div></div>

-- 
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