Bug 234716 - Draggable attribute on DOM node breaks On This Page highlighting
Summary: Draggable attribute on DOM node breaks On This Page highlighting
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari 15
Hardware: iPhone / iPad iOS 15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-12-27 20:47 PST by Steve Dignam
Modified: 2022-01-03 20:48 PST (History)
4 users (show)

See Also:


Attachments
minimal reproducible example showing how draggable=true breaks the search feature (206 bytes, text/html)
2021-12-27 20:47 PST, Steve Dignam
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Dignam 2021-12-27 20:47:11 PST
Created attachment 448031 [details]
minimal reproducible example showing how draggable=true breaks the search feature

When adding the draggable=true attribute to a DOM node, the text of the node is no longer searchable using iOS Safari's On This Page feature.

On This Page will correctly count the results, but navigating between the results won't highlight any results nested inside a DOM node marked with draggable=true.
Comment 1 Steve Dignam 2021-12-27 20:50:45 PST
Also On This Page has the option to navigate up or down the page, and navigating up finds the first element, but not the second, and navigating down finds neither element.
Comment 2 Wenson Hsieh 2021-12-29 14:43:18 PST
This is likely due to how adding the `draggable` attribute additionally applies `-webkit-user-select: none;` as presentational CSS.

A workaround might be to apply `-webkit-user-select: text;` separately (e.g. as an inline style), which would override the presentational property.
Comment 3 Radar WebKit Bug Importer 2022-01-03 20:48:22 PST
<rdar://problem/87076683>