Bug 110005

Summary: "-webkit-user-select:none" is not always honored when selecting parent (or ancestor) DOM elements
Product: WebKit Reporter: Kristof Csillag <csillag.kristof>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: bfulgham
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://jsfiddle.net/yWjCG/4/

Kristof Csillag
Reported 2013-02-15 23:42:29 PST
When selecting parts of the DOM using the selection API, and then reading back the selected content (with the selection API), content that is configured as non-user-selectable (by adding user-select:none in the CSS) is sometimes included. I have not been able to exactly pinpoint the circumstances that trigger this. For an example, see this: http://jsfiddle.net/yWjCG/4/ In the linked test, "Test level 3" and "Test level 2" omit the non-user-selectable part of the text, as specified, but "Test level 1" includes it in the selection, which seems to be a bug. Firefox does this right. (It omits the non-user-selectable text in all test cases.) Detected with: Chromium 24.0.1312.68 (Developer Build 180326) Debian 7.0 Powered by WebKit 537.17 (trunk@132834)
Attachments
Brent Fulgham
Comment 1 2022-07-13 14:08:19 PDT
Blink and WebKit have the same behavior, Gecko is different. I don't believe this shows a web compatibility issue, but we are working on addressing WPT failures, so please create a WPT if you feel that this area is underspecified.
Note You need to log in before you can comment on or make changes to this bug.