DevTools: unable to copy-paste text from object preview |
||
Issue descriptionevaluate 'window': > window try copying part of its title - it expands / collapses.
,
Dec 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f9da6579a97d1e0be87de603df160a6c9358c0ae commit f9da6579a97d1e0be87de603df160a6c9358c0ae Author: luoe <luoe@chromium.org> Date: Thu Dec 22 03:50:27 2016 DevTools: better hasSelection check to include composed trees When shadow elements receive an event, the handler may to check for selections with hasSelection(). This CL makes hasSelection additionally check any composed subtrees by recursively calling itself on distributed nodes. BUG= 674739 Review-Url: https://codereview.chromium.org/2588833004 Cr-Commit-Position: refs/heads/master@{#440332} [modify] https://crrev.com/f9da6579a97d1e0be87de603df160a6c9358c0ae/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js
,
Jan 10 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by l...@chromium.org
, Dec 16 2016Our treeOutline's shadow element gets the click event and tries to cancel the expansion if it has any selection. Strangely, the shadowElement.getSelection() is collapsed, but the element composed into the shadowElement's <content> has composedElement.getSelection() with a real selection and range! In this scenario, we really need to have a way for a element in shadow to know if any of its composed children have a selection. @hayato: with your familiarity with shadow DOM, do you know of any way we could do this? The composed element with non-empty selection can be reached with window.getSelection(), but there seems to be no way to check whether a shadow element S contains a composed element C. After reading the discussion below, it appears that a new .contains(target, {includeShadow: true}) was to be introduced in V2. Could you tell us if this would fit our use case, and is there anything we can do today? I would rather not make a workaround if the platform supports an approach I don't know of! https://github.com/hayatoito/test/issues/171