WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
203386
document.caretRangeFromPoint returns wrong range on google docs
https://bugs.webkit.org/show_bug.cgi?id=203386
Summary
document.caretRangeFromPoint returns wrong range on google docs
Mikhail Labanov
Reported
2019-10-24 16:09:08 PDT
Created
attachment 381852
[details]
Screenshot with notes for observing bug on the page document.caretRangeFromPoint returns incorrect range for some google docs documents Steps to reproduce: 1. Open
https://docs.google.com/document/d/1G0PhdEEVO1BTzRHZipnksOci4eIWyXEevPvHL5rlNxM/edit?usp=sharing
2. Set browser window width to 1490 (not necessary but helps with exact coordinates sync) 3. Open developer tools 4. Call document.caretRangeFromPoint(595.265625, 293) -- it's coordinates of first letter of word 'general' in the 4th line of the doc 5. Observe returned range. Its startContainer and endContainer erroneously point to different Dom node, in this case blue underline that google docs use to imitate link on ', I am a link' text in the middle of the document Expected behavior: document.caretRangeFromPoint(595.265625, 293) returns range in textNode containing 'general' in the 4th line of the doc Notes: doc.elementFromPoint(595.265625, 293) on the other hand works just right
Attachments
Screenshot with notes for observing bug on the page
(160.66 KB, image/png)
2019-10-24 16:09 PDT
,
Mikhail Labanov
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2019-10-24 16:46:00 PDT
<
rdar://problem/56600253
>
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