[Webkit-unassigned] [Bug 220523] New: getSelection().focusNode in iOS is not pointing to the correct node

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 11 12:11:41 PST 2021


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

            Bug ID: 220523
           Summary: getSelection().focusNode in iOS is not pointing to the
                    correct node
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: iPhone / iPad
                OS: iOS 14
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: kkeating at gmail.com

window.getSelection().focusNode behavior difference on iOS than it is on Android, MacOS and Windows 10.

Minimal example:
https://kyle-keating.s3-us-west-1.amazonaws.com/getSelection_issue.html

This is a simple html page with two paragraphs. As you make a selection to highlight text (using a mouse or touch device), the value of the focusNode is reported in the input field.


Using a webkit browser on the desktop (such as Safari), 

1. Highlight text in the first paragraph and drag the selection to the second. Notice the value of the input field changes from the text in the first paraph to the second.
2. Repeat this same test but start from the second paraph and drag and select up to the first. Notice the value of the input field changes from the text in the second paraph to the first.

I assume this is the correct behavior.

Now, using an iOS device perform the same two tests. The second test fails as the value of focusNode does not change when making a selection from a node lower in the DOM to one higher. I believe this is a bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210111/5614f8dc/attachment.htm>


More information about the webkit-unassigned mailing list