New issue
Advanced search Search tips

Issue 631438 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Context menu item "copy" disabled when triple clicking on element inside shadow DOM

Reported by eugenit...@gmail.com, Jul 26 2016

Issue description

Chrome Version       : 49.0.2623.0 (Developer Build) (64-bit)
URLs (if applicable) : NO
Other browsers tested: 
  FAIL 50.0.2661.8125 (64-bit version)
have tested this issue:
     Safari: YES
    Firefox: YES
         IE: YES

What steps will reproduce the problem?
(1) Create file.html with following content:
<!DOCTYPE html>
<html>
	<head>
		<script>
			var Proto = Object.create(HTMLElement.prototype);

			Proto.createdCallback = function() {

			  // Attach a shadow root on the element.
			  var shadow = this.createShadowRoot();

			  // Fill it with text.
			  shadow.innerHTML = "<strong>Try:</strong> (1) triple click (2) right click (3) copy";
			};

			// Register custom element
			document.registerElement('x-el', { prototype: Proto })
		</script>
	</head>
	<body>
		<div>
			<x-el></x-el>
		</div>
		<div>
			<x-el></x-el>
		</div>
	</body>
</html>
(2) Open file in browser
(3) Triple click on SECOND text line (for fast select content)
(4) Right click on selection
(5) Menu item "copy" is enabled
(6) Triple click on FIRST text line (for fast select content)
(7) Right click on selection

What is the expected result?
Menu item "copy" is enabled

What happens instead?
Menu item "copy" is disabled, CMD+C also does not work 

Please provide any additional information below. Attach a screenshot if
possible.
(1) If you call in web console: 
  document.getSelection().type while: 
    first line selected, you get "Caret"
    second line selected, you get "Range"
  document.getSelection().toString() while: 
    first line selected, you get ""
    second line selected, you get "Try: (1) triple click (2) right click (3) copy"
(2) System info in attachments
 
bugreport.png
140 KB View Download
bugsysinfo.png
67.8 KB View Download

Comment 1 by tkent@chromium.org, Jul 26 2016

Cc: yosin@chromium.org
Components: Blink>TextSelection Blink>WebComponents
Status: Untriaged (was: Unconfirmed)
Can reproduce with Mac Canary 54.0.2809.0

Comment 3 by hayato@chromium.org, Jul 28 2016

Owner: xiaoche...@chromium.org
Status: Assigned (was: Untriaged)
xiaochengh@, could you work on this?
Components: Blink>DOM
Labels: OS-Linux OS-Mac
Can repro with Version 54.0.2810.0 (64-bit) on ubuntu 14.04, the "copy" is also disabled on the right click menu. For Firefox, it displayed nothing when opening this file.

Comment 5 by hayato@chromium.org, Oct 12 2016

Components: -Blink>WebComponents -Blink>DOM Blink>DOM>Events Blink>DOM>ShadowDOM

Comment 6 by tkent@chromium.org, Oct 12 2016

Components: -Blink>TextSelection Blink>Editing>Selection
Any progress?
Cc: xiaoche...@chromium.org
Owner: ----
Status: Available (was: Assigned)
No...

Comment 9 by hayato@chromium.org, Dec 12 2016

Owner: yosin@chromium.org
Status: Assigned (was: Available)
yosin@, could you have a chance to take a look?

Comment 10 by tkent@chromium.org, Mar 15 2017

Components: -Blink>DOM>Events Blink>DOM
Remove Blink>DOM>Events

Comment 11 by yosin@chromium.org, Mar 23 2017

Owner: ----
Status: Available (was: Assigned)
Components: -Blink>DOM -Blink>DOM>ShadowDOM
Project Member

Comment 13 by sheriffbot@chromium.org, May 28 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
OK, let's close it

Comment 15 by yosin@chromium.org, May 29 2018

Status: Available (was: Untriaged)

Sign in to add a comment