WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
240011
Double tap to hold on a Canvas tag to selected other text
https://bugs.webkit.org/show_bug.cgi?id=240011
Summary
Double tap to hold on a Canvas tag to selected other text
misinoe.t
Reported
2022-05-03 07:51:16 PDT
Created
attachment 458744
[details]
This is a working demo and recorded video I have confirmed that the paint web application I developed does not work properly on my iPad Pro. Pursuing deeper, I found that When I double tap and hold on an HTMLCanvasElement, nearby text is selected. This causes the focus to be incorrect and the position of the magnifier to be fixed to the top of the selected text.
Attachments
This is a working demo and recorded video
(451.29 KB, application/zip)
2022-05-03 07:51 PDT
,
misinoe.t
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2022-05-03 18:22:53 PDT
Able to reproduce on trunk WebKit, iOS 15. The `canvas` element already has `user-select: none;`, but that doesn't seem to have any effect :( (Using `-webkit-user-select: none;` didn't make any difference either).
Wenson Hsieh
Comment 2
2022-05-03 18:32:12 PDT
I think we can fix this by relaxing this check: ``` (in WKContentViewInteraction.mm:) if (gesture == UIWKGestureLoupe && _positionInformation.selectability == WebKit::InteractionInformationAtPosition::Selectability::UnselectableDueToUserSelectNone) return NO; ``` ...to something like this instead: ``` (in WKContentViewInteraction.mm:) if (gesture != UIWKGestureOneFingerTap && _positionInformation.selectability == WebKit::InteractionInformationAtPosition::Selectability::UnselectableDueToUserSelectNone) return NO; ``` I _suspect_ the choice to limit this to only the Loupe gesture was made to (1) limit risk, and (2) to make it so that the user can always still tap in `-webkit-user-select: none;` regions to clear an existing selection. One workaround here would be to add active touch event listeners and prevent `touchstart` and/or `touchend`.
Radar WebKit Bug Importer
Comment 3
2022-05-10 07:52:15 PDT
<
rdar://problem/93028767
>
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