[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
Thu Jun 23 15:44:40 PDT 2011


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





--- Comment #20 from Ryosuke Niwa <rniwa at webkit.org>  2011-06-23 15:44:40 PST ---
(In reply to comment #18)
> 1)
> "hello world" selection is "llo wo". We delete text 1,4 to become "h world".
> New selection should be " wo"?

Yes.

> 2) 
> "hello world" selection is "llo wo". We replace text 1,4 to become "hoyo world".
> New selection should be "yo wo"? That is selection start shouldn't move?

In this case, are we replacing "ello" by "oyo"?  Since selection starts in the replaced text, I'd expect the selection to move to after "o" to result in " wo".

> I based it on these assumptions:
> if position is in bounds of the inserted text don't change it.
> If it's not move it to the beginning or the end of the new text.

We need to have a different behavior for start/end points.  For start point, when inserting text, should move the position forward when inserting at the boundary.  Because user didn't select the text that has been inserted.  For end point, you shouldn't move the position forward when a text is inserted at the boundary because doing so will results in selecting the inserted text.

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