WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
119711
Make CSS property user-select:none not to affect Document.caretRangeFromPoint()
https://bugs.webkit.org/show_bug.cgi?id=119711
Summary
Make CSS property user-select:none not to affect Document.caretRangeFromPoint()
Ryosuke Niwa
Reported
2013-08-12 18:03:48 PDT
Consider merging
https://chromium.googlesource.com/chromium/blink/+/50bbb9f6ab3394327e8fa63312316e6ae217a7a2
This patch introduces PositionWithAffinity as return value of RenderObject::positionForPoint() for making CSS property user-select:none doesn't affect Document.caretRangeFromPoint() and changes caretRangeFromPoint() to use Position instead of VisiblePosition, which excludes user-select:none.
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2013-08-13 09:58:24 PDT
I wonder if user-select:none breaks OS X Dictionary.
oleary.gabe
Comment 2
2022-01-20 14:02:09 PST
8+ years later and this bug is still present which makes certain functionality difficult if not impossible to replicate in iOS.
Ahmad Saleem
Comment 3
2022-08-21 09:58:48 PDT
I changed the test case from patch to JSFiddle: Link -
https://jsfiddle.net/4p7rexLf/
*** Safari 15.6.1 on macOS 12.5.1 / STP 151 *** FAIL range.startContainer should be [object Text]. Was [object Text]. FAIL range.startOffset should be 2. Was 0. PASS range.collapsed is true PASS successfullyParsed is true *** Firefox Nightly 105 *** FAIL successfullyParsed should be true (of type boolean). Was undefined (of type undefined). *** Chrome Canary 106 *** PASS range.startContainer is $("sample").firstChild PASS range.startOffset is 2 PASS range.collapsed is true PASS successfullyParsed is true ______________ Just wanted to share updated test results. Thanks!
Ahmad Saleem
Comment 4
2023-01-29 14:17:27 PST
(In reply to Ahmad Saleem from
comment #3
)
> I changed the test case from patch to JSFiddle: > > Link -
https://jsfiddle.net/4p7rexLf/
> > *** Safari 15.6.1 on macOS 12.5.1 / STP 151 *** > > FAIL range.startContainer should be [object Text]. Was [object Text]. > FAIL range.startOffset should be 2. Was 0. > PASS range.collapsed is true > PASS successfullyParsed is true > > *** Firefox Nightly 105 *** > > FAIL successfullyParsed should be true (of type boolean). Was undefined (of > type undefined). > > *** Chrome Canary 106 *** > > PASS range.startContainer is $("sample").firstChild > PASS range.startOffset is 2 > PASS range.collapsed is true > PASS successfullyParsed is true > > ______________ > > Just wanted to share updated test results. Thanks!
I get: PASS range.startContainer is $("sample").firstChild PASS range.startOffset is 2 PASS range.collapsed is true PASS successfullyParsed is true TEST COMPLETE Before Test After In Safari Technology Preview 162 - I think we can mark this as "RESOLVED CONFIGURATION CHANGED" now. Thanks!
Ahmad Saleem
Comment 5
2023-05-19 10:18:50 PDT
Working as expected in Safari 16.5 (might as well be in Safari 16.4).
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