Bug 208682 - Drag from a -webkit-user-select:none element should not start selection
Summary: Drag from a -webkit-user-select:none element should not start selection
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Blocks: 208677
  Show dependency treegraph
Reported: 2020-03-05 17:26 PST by Carlos Alberto Lopez Perez
Modified: 2023-08-15 20:49 PDT (History)
7 users (show)

See Also:

Patch (1.75 KB, patch)
2022-04-19 11:06 PDT, Tim Nguyen (:ntim)
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2020-03-05 17:26:15 PST
The spec <https://www.w3.org/TR/css-ui-4/#propdef-user-select> is clear in this respect:
    The UA must not allow selections to be started in this element. 

So, as a fix to this consider merging chromium patch: https://chromium.googlesource.com/chromium/src/+/f6dcdcf4917ba56f5576ef7d5d11d869630d2760

Test case from https://bugs.chromium.org/p/chromium/issues/detail?id=481985
> Open http://jsbin.com/zufeva/1/
> Start dragging on the first box (-webkit-user-select:none) and drag into the second (no -webkit-user-select).
> IE and Firefox appear to implement their user-select variants differently where it controls whether selection can be STARTED.  So there, if you start in the first box, you won't select text anywhere.
Comment 1 Carlos Alberto Lopez Perez 2020-03-05 19:29:57 PST
(In reply to Carlos Alberto Lopez Perez from comment #0)
> So, as a fix to this consider merging chromium patch:
> https://chromium.googlesource.com/chromium/src/+/
> f6dcdcf4917ba56f5576ef7d5d11d869630d2760

This fix can't be merged as such. It causes issues on the web-inspector, the text on the console becomes non selectable. The same happened on chromium after merging it (it was reverted later). See: https://bugs.chromium.org/p/chromium/issues/detail?id=615227
Comment 2 Radar WebKit Bug Importer 2022-04-19 06:11:45 PDT
Comment 3 Tim Nguyen (:ntim) 2022-04-19 11:06:43 PDT
Created attachment 457916 [details]
Comment 4 Tim Nguyen (:ntim) 2022-04-19 11:07:09 PDT
The Web inspector issue is still reproducible.
Comment 5 Tim Nguyen (:ntim) 2022-04-19 11:07:51 PDT
STR for the WI issue:
1) Open DevTools, open Console
2) "window" and press enter
3) Try to select the logged text by clicking and dragging