[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:36:14 PDT 2011


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


Una Sabovic <una.sabovic at palm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #98421|                            |review?
               Flag|                            |




--- Comment #18 from Una Sabovic <una.sabovic at palm.com>  2011-06-23 15:36:14 PST ---
Created an attachment (id=98421)
 --> (https://bugs.webkit.org/attachment.cgi?id=98421&action=review)
shouldRemovePositionAfterAdoptingTextReplacement change

Ryosuke, I have a question about the expected behavior.
By example

1)
"hello world" selection is "llo wo". We delete text 1,4 to become "h world".
New selection should be " wo"?

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?

Attached is a diff for shouldRemovePositionAfterAdoptingTextReplacement.
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.

I couldn't think of a scenario in which we would still return "true" from this function.

I ran the tests with this change and more tests would need the expected output update but none failed.

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