[webkit-reviews] review requested: [Bug 62092] setting innerText to an empty string on editable div loses focus : [Attachment 98421] shouldRemovePositionAfterAdoptingTextReplacement change

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 23 15:36:14 PDT 2011


Una Sabovic <una.sabovic at palm.com> has asked  for review:
Bug 62092: setting innerText to an empty string on editable div loses focus
https://bugs.webkit.org/show_bug.cgi?id=62092

Attachment 98421: shouldRemovePositionAfterAdoptingTextReplacement change
https://bugs.webkit.org/attachment.cgi?id=98421&action=review

------- Additional Comments from Una Sabovic <una.sabovic at palm.com>
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.


More information about the webkit-reviews mailing list