Bug 234716

Summary: Draggable attribute on DOM node breaks On This Page highlighting
Product: WebKit Reporter: Steve Dignam <steve>
Component: DOMAssignee: Patrick Griffis <pgriffis>
Status: RESOLVED FIXED    
Severity: Normal CC: megan_gardner, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: iPhone / iPad   
OS: iOS 15   
Attachments:
Description Flags
minimal reproducible example showing how draggable=true breaks the search feature none

Steve Dignam
Reported 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.
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
Steve Dignam
Comment 1 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.
Wenson Hsieh
Comment 2 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.
Radar WebKit Bug Importer
Comment 3 2022-01-03 20:48:22 PST
Patrick Griffis
Comment 4 2023-05-02 14:09:42 PDT
EWS
Comment 5 2023-05-23 18:23:28 PDT
Committed 264448@main (1605f4df0c4b): <https://commits.webkit.org/264448@main> Reviewed commits have been landed. Closing PR #13374 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.