NEW278455
Custom Highlighting API does not highlight when "user-select: none" is active
https://bugs.webkit.org/show_bug.cgi?id=278455
Summary Custom Highlighting API does not highlight when "user-select: none" is active
Thomas
Reported 2024-08-21 01:44:33 PDT
Unlike other Browser Engines, Webkit doesn't apply the highlighting style to elements where "user-select: none" is active. Reproduction Codepen: https://codepen.io/tho-masn/pen/poXLwoG Steps to reproduce: - Open the Codepen in Chromium Browsers => works - Open the Codepen in Safari => doesn't work - Remove the "user-select" properties from the CSS => now it works in Safari as well It probably makes sense to apply the ::highlight styles also to elements where "user-select" is set to "none". Search highlighting should be independent of the user selection property.
Attachments
Radar WebKit Bug Importer
Comment 1 2024-08-28 01:45:14 PDT
alex
Comment 2 2024-11-19 18:25:53 PST
Firefox nightly 134.0a1 behaves similar to Chrome, and is correctly applying highlighting style with "user-select: none" --- I ran into this bug with the Custom Highlighting API. In my app, I need to disable regular user text selection on certain components (due to them capturing gestures/drags), but I still want to allow search/highlight with Custom Highlighting API.
Note You need to log in before you can comment on or make changes to this bug.