New issue
Advanced search Search tips

Issue 649828 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 650722



Sign in to add a comment

DevTools: selecting text across shadow DOM boundary does not behave well

Project Member Reported by l...@chromium.org, Sep 23 2016

Issue description

Version: 55

What steps will reproduce the problem?
(1) Open DevTools console, evaluate "throw 123"
(2) Click to expand the error and see "Uncaught 123\n(anonymous) @ VM87:1"
(3) Select text from "Uncaught..." to "...@ V" (must end before the end of the trace message)
(4) Copy and paste the result somewhere

What is the expected output?
Should paste "Uncaught 123\n(anonymous) @ VM87:1"

What do you see instead?
Pastes "Uncaught 123"

Stack trace previews are currently rendered using shadow DOM.  The selection logic we use in ViewportControl doesn't behave well when the start and end nodes of a selection separated by shadow boundaries.

This blocks console exporting bugs because selecting stack traces in the console fails due to this.
 

Comment 1 by l...@chromium.org, Sep 27 2016

Blockedon: 650722

Comment 2 by l...@chromium.org, Nov 8 2017

Blocking: -505177
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/80f526543bbe0692624591c0f9ef968fec1d498f

commit 80f526543bbe0692624591c0f9ef968fec1d498f
Author: Erik Luo <luoe@chromium.org>
Date: Sat Nov 18 03:37:31 2017

DevTools: allow copying visible text with styles in console

Console's custom copy handler tries to determine the selected text on
its own. In some cases, the browser's default copy handler offers much
better behavior:
- Include styles and colors
- Include table indentation that can be pasted into spreadsheet editors
- Account for text selections across shadow boundaries

Bug:  673746 ,  697149 ,  649828 
Change-Id: I4b5e3a225234e28fe84197a73f655af9c4c9f418
Reviewed-on: https://chromium-review.googlesource.com/773462
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517691}
[modify] https://crrev.com/80f526543bbe0692624591c0f9ef968fec1d498f/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
[modify] https://crrev.com/80f526543bbe0692624591c0f9ef968fec1d498f/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js

Comment 4 by l...@chromium.org, Nov 18 2017

Cc: -lushnikov@chromium.org
Status: Fixed (was: Assigned)
Since this issue is blocked, we can offer a partial solution for now, in which users "Copy visible styled text" from the context menu to achieve this functionality.

Sign in to add a comment