[Webkit-unassigned] [Bug 62092] setting innerText to an empty string on editable div loses focus

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 29 15:39:28 PDT 2011


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





--- Comment #41 from Una Sabovic <una.sabovic at palm.com>  2011-08-29 15:39:28 PST ---
I uploaded just the code patch and new test case for review.
This patch is aiming to update the selection on document mutation per spec that Ryosuke mentioned: http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-Mutation

This change impacts a bunch of existing layout tests and I wanted to run the expected behavior by a reviewer before fixing up all the tests.

One thing in the spec that is little strange is 

>> 
Note that when content is inserted at a boundary-point, it is ambiguous as to where the boundary-point should be repositioned if its relative position is to be maintained. There are two possibilities: at the start or at the end of the newly inserted content. We have chosen that in this case neither the container nor offset of the boundary-point is changed. As a result, the boundary-point will be positioned at the start of the newly inserted content.
>>

I understood this as: If we insert at the beginning of the selection, selection will expand to include the inserted content, but if we insert at the end boundary point, since offset is not supposed to change, new selection will NOT include the inserted content. The difference seems a little strange...


>> Combining the two code pieces

I'm not sure how to combine the two code pieces since one updates the position itself while other sets the new selection.

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