WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 220523
220522
getSelection().focusNode in iOS is not pointing to the correct node
https://bugs.webkit.org/show_bug.cgi?id=220522
Summary
getSelection().focusNode in iOS is not pointing to the correct node
Kyle
Reported
2021-01-11 12:05:54 PST
document.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.
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2021-01-11 16:50:40 PST
*** This bug has been marked as a duplicate of
bug 220523
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug