[Webkit-unassigned] [Bug 145430] Selection in input gets removed when input is assigned to a new value.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 28 21:59:26 PDT 2015


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

Ryosuke Niwa <rniwa at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #253888|review?                     |review-
              Flags|                            |

--- Comment #5 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 253888
  --> https://bugs.webkit.org/attachment.cgi?id=253888
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=253888&action=review

r- because this patch is missing a test.
I'm also worried that this change is not backwards compatible and may worsen the certain aspects of user interaction.

> Source/WebCore/html/TextFieldInputType.cpp:129
> +    if (Frame* frame = input->document()->frame()) {
> +        start = frame->selection()->selection().start().offsetInContainerNode();
> +        end = frame->selection()->selection().end().offsetInContainerNode();
> +    }

This is wrong. containerNode could be a div in the shadow DOM.
We should be using element().selectionStart() and element().selectionEnd() instead.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150529/68fff8a4/attachment.html>


More information about the webkit-unassigned mailing list