New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 54 users

Issue metadata

Status: Fixed
Merged: issue 602947
Owner: ----
Closed: Feb 2018
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Show other hotlists

Hotlists containing this issue:

Sign in to add a comment

Issue 147490: Clipboard uses text that has user-select: none

Reported by, Sep 9 2012

Issue description

Chrome Version       : 21.0.1180.89
OS Version: OS X 10.6.8
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari 5:
  Firefox 4.x:
     IE 7/8/9:

What steps will reproduce the problem?
1. Take this html code:

Bug example<br/><div style="-webkit-user-select: none;">This should not be copied</div> <br/>Select all </div> Hi all

2. Select all and copy the content to your clipboard. 

What is the expected result?
Text in the div should not be highlighted. All content should be copied to the clipboard expect of text that is effected by "-webkit-user-select: none"

What happens instead?
Text in the div is not being highlighted.All content is copied to the clipboard. Even the text inside the "-webkit-user-select: none" div.

Please provide any additional information below. Attach a screenshot if

UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1
124 bytes View Download

Comment 1 by, Sep 9 2012

Labels: -Area-Undefined Area-WebKit Action-FeedbackNeeded
Can you reproduce this issue with Chrome Canary too ?

Download at:

Comment 2 by, Sep 9 2012

Yes that bug does even appear with the latest Canary build.

Comment 3 by, Sep 9 2012

Okay. Thanks for your feedback. Could please do one more test for us:

Please check it with If it is also a problem with Webkit Nightly, then please file also a report at and post the webkit-bug-number here.

Many thanks in advance.

Comment 4 by, Oct 18 2012

marius.falke@, Could you please update us as per comment#3?


Comment 5 Deleted

Comment 6 Deleted

Comment 7 by, Jan 16 2013

Sorry for my late reply.

The latest Webkit build is effected by this bug too. There is also a webkit bug report available but nobody seems to care about it anymore

One user writes that it does work properly on Firefox but on my system (Mac OS, Firefox 16.0.1) it does not.

Comment 8 by, Jan 16 2013

In firefox the text is selected, but doesn't show up in the clipboard. In chrome, the text isn't selected, but still ends up in the clipboard.

Comment 9 by, Jan 22 2013

I confirm it still happens in last chrome stable version (24.0.1312.52)

Comment 10 by, Mar 9 2013

Project Member
Labels: -Action-FeedbackNeeded Needs-Feedback

Comment 11 by, Mar 10 2013

Project Member
Labels: -Area-WebKit Cr-Content

Comment 12 by, Apr 5 2013

Project Member
Labels: -Cr-Content Cr-Blink

Comment 13 by, May 20 2013

Confirmed in Chrome 26 (stable) and Chrome 29 (canary).

Comment 14 by, Aug 20 2013

Labels: -OS-Mac -Needs-Feedback Cr-Blink-Editing
Status: Available
An even simpler test case:
abc<span style="-webkit-user-select: none">def</span>ghi

If you Select All and copy, only "abc" and "ghi" is shown selected, but "abcdefghi" is copied.

It seems there's no consensus on about the desired behavior. Not sure what we want to do either.

Comment 15 by, Aug 20 2013

+yosin: FYI

Comment 16 by, Aug 20 2013

Labels: -Cr-Blink
Also it's worth nothing that window.getSelection includes the "user-select: none" text.

Comment 17 by, Aug 30 2013

Labels: -Type-Bug Type-Feature
Status: Unconfirmed
Summary: Feature Request: How do you copy contents with -webkit-user-select: none? (was: Chrome copies unselected text to the clipboard when -webkit-user-select: none; is activated)
The spec doesn't specified behavior yet.
Chrome, FireFox and IE do differently, see attached file; it is produced by

It seems Chrome's choice is confusing because visual and copied content are different.
6.2 KB View Download

Comment 18 by, Aug 15 2014

Labels: Cr-Blink-Selection

Comment 19 by, Nov 14 2014

 Issue 425944  has been merged into this issue.

Comment 20 by, Jan 2 2015

FYI Firefox's confusing behavior where "the text is selected, but doesn't show up in the clipboard" has been fixed in Firefox 35 (currently still in beta):

So -moz-user-select:none is pretty much perfect now in Firefox.

Comment 21 by, Jan 5 2015

Status: Untriaged
Marking 'untriaged' as this is a new feature request.

Thank you!

Comment 22 Deleted

Comment 23 by, Jul 21 2015

Labels: -Cr-Blink-Selection Cr-Blink-Editing-Selection

Comment 24 by, Jul 23 2015

Status: Assigned

Comment 25 by, Aug 5 2015

Labels: -Cr-Blink-Editing-Selection Cr-Blink-TextSelection

Comment 26 by, Aug 20 2015

 Issue 425800  has been merged into this issue.

Comment 27 by, Aug 20 2015

 Issue 521337  has been merged into this issue.

Comment 28 by, May 20 2016

Mergedinto: 602947
Status: Duplicate (was: Assigned)

Comment 29 by, May 23 2016

 Issue 602947  has been merged into this issue.

Comment 30 by, May 23 2016

Status: Available (was: Duplicate)
Summary: Dragging over user-select:none should not be select the element. (was: Feature Request: How do you copy contents with -webkit-user-select: none?)
Pasted from  Issue602947 
Version: Version 52.0.2706.0 canary (64-bit)
OS: Windows

What steps will reproduce the problem?
(1) go
(2) drag over a user-select:none element.
(3) copy and paste to textarea

What is the expected output?
The user-select:none element should not be selection-painted and not be copied.

What do you see instead?
The element was copied.

FireFox: The element is not selection-painted and is not copied.
Edge: The element is selection-painted and is copied.

Comment 31 by, May 23 2016

Labels: Hotlist-Interop
Marking as an interoperability issue, like the issue that was just merged into it.

Comment 32 by, Jul 7 2016


Comment 33 by, Aug 10 2016

To extend on this, user-select:none elements could benefit from an optimization by not repainting them as the selection passes over them, and when a selection containing a user-select:none element is removed.

Try visiting , enabling Paint Flashing in extra rendering settings in Chrome DevTools, and highlighting from "ipsum" to "Sed".  Notice how everything between is repainted.  Now deselect by clicking somewhere else, and notice how the user-select-none element is repainted again.

Comment 34 by, Aug 31 2016

There are actually cases where -webkit-user-select: none CAUSES the text to be copied where it would not before!

On Chrome 52.0.2743.116 (64-bit) for OS X, with the following HTML:

  <div>Some text above the no copy</div>
  <div class="nocopy">NOCOPY</div>
    Some more text down here

If the .nocopy class has -webkit-user-select: none, and I triple click inside of the top div to select the line and copy, the clipboard has:

Some text above the no copy

If I do the same thing without -webkit-user-select: none, then the clipboard has "Some text above the no copy" as expected.

Here's a jsfiddle:

Comment 35 by, Aug 31 2016


Comment 36 by, Oct 5 2016

Status: Assigned (was: Available)

Comment 37 by, Oct 12 2016

Components: -Blink>TextSelection Blink>Editing>Selection

Comment 38 by, Nov 7 2016

 Issue 662783  has been merged into this issue.

Comment 39 by, Jul 18 2017

Status: Fixed (was: Assigned)
This works for me in 60.0.3112.66.

Comment 40 by, Jul 20 2017

Status: Available (was: Fixed)
Selection with drag (or CTRL+A) no longer highlights 'user-select: none' but marked text can still be copied.

Comment 41 by, Jul 20 2017

Summary: Clipboard uses text that has user-select: none (was: Dragging over user-select:none should not be select the element.)

Comment 42 by, Jul 20 2017

 Issue 705526  has been merged into this issue.

Comment 43 by, Oct 4 2017

Labels: Pri-3

Comment 44 by, Oct 25 2017

I can confirm that this issue still exists.

Mac OS Sierra: Version 10.12.6
Chrome: Version 61.0.3163.100 (Official Build) (64-bit)

Comment 45 by, Oct 26 2017

Also can confirm.

Debian GNU/Linux Buster, Linux 4.13.4-2
Chrome: 63.0.3239.9 (Official Build) dev (64-bit)

Comment 46 by, Oct 30 2017

Labels: -Pri-3 Pri-2

Comment 47 by, Oct 31 2017

Owner: ----

Comment 48 by, Nov 15 2017

Project Member
The following revision refers to this bug:

commit b459f745e00bbe6734a144bcd29eefb3cd676a39
Author: tanvir.rizvi <>
Date: Wed Nov 15 06:23:08 2017

Clipboard should respect user-select style attribute

Clipboard 'copy/paste'data also contains the elements on which
user-select:none property has been applied.
But the visible selection do not highlights those portions.
The copy data should respect the user-select attribute.
Currently the clipboard copy paste data only depends upon
the selection done in the DOM tree.
This CL makes the clipbaord text to work with the
text property

Bug:  147490 
Change-Id: I5ccc6ebce67e630d0eb9949e514da77f52a6ed42
Reviewed-by: Xiaocheng Hu <>
Reviewed-by: Yoshifumi Inoue <>
Commit-Queue: Tanvir Rizvi <>
Cr-Commit-Position: refs/heads/master@{#516608}

Comment 49 by, Jan 10 2018

Labels: Pri-3

Comment 50 by, Feb 1 2018

Seems to work fine now in Chrome 64.0.3282.119 on Windows 8.1

Comment 51 by, Feb 1 2018

I can also confirm that it is working now.

Debian GNU/Linux Buster, Linux 4.14.13-1
Chrome: 65.0.3325.31 (Official Build) dev (64-bit)

Comment 52 by, Feb 2 2018

Status: Fixed (was: Available)

Comment 53 by, Jun 7 2018

This is NOT fixed completely.

If you paste text/plain (e.g. into a <textarea>), the `user-select: none` content is correctly excluded.

But if you paste text/html (e.g. into a <div contenteditable>), the `user-select: none` content is included.

(Reproduced on Chrome 67 on Windows.)

Comment 54 by, Jun 7 2018

Whatever the devs have done to fix this, they failed and did it incorrectly.

I have created a repo showing two ways to get the text selection.
First one via window.getSelection (using chrome.commands and content script).
Note: You will have to set the keyboard shortcut command in chrome://extensions/shortcuts
I used Ctrl+Shift+S.

Second one via clickData.selectionText (using chrome.contextMenus).

Test site:
Scroll down to "Highlighted comment" and click "View all <number> replies".
Find a comment with the "Read more". Select the whole comment via double click on comment text or via manual mouse selection, drag mouse until see the Thumbs up vote number getting selected.
Note: For the "Read more" to show up you will have to be logged in. Discovered that out when I tested in incognito mode.
I used the second comment from TheHektor89.

The text selection output is shown in the background page -> console tab.

Tested with Chrome Version 67.0.3396.62.
1.7 KB Download

Comment 55 by, Jun 7 2018


Comment 56 by, Jun 7 2018

#53, 54 - you might want to file new issues for those, as 5 versions have already been branched since the fix (#48). You can comment here with the new issues.

Comment 57 by, Jun 7 2018

#56 - New issue created on your suggestion.
Issue 850685 - "Text selection includes text from elements with user-select: none" -

The new issue may require tags adjustments that I am unable to do.

Sign in to add a comment