DevTools: Copy selector produces invalid selector when it starts with a double hyphen
Reported by
ovkadu...@gmail.com,
Jan 11 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2978.0 Safari/537.36 Steps to reproduce the problem: 1. Go to https://jsfiddle.net/ovkadurin/71dud8Lh/ 2. Open DevTools, open Elements panel 3. Select the div that has css class "--area" 4. Right click -> copy -> copy selector 5. Paste in anywhere. Its value is "body > div > div > div.\2d -area" which is invalid selector. What is the expected behavior? Selector should be "body > div > div > div.--area" What went wrong? Wrong selector Did this work before? N/A Chrome version: 57.0.2978.0 Channel: canary OS Version: 10.0 Flash Version: Shockwave Flash 24.0 r0
,
Jan 11 2017
Leave it to lusha to decide if we want to implement it.
,
Jan 16 2017
,
Jan 25 2017
@lushnikov-- Could you please provide us any update on this . Thanks!
,
Mar 10 2017
@lushnikov - Ping! could you please let us know is there any latest update available for this issue? Thanks!
,
Apr 10 2017
Let's fix this. Eric, could you please take a look?
,
Apr 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/188903bc2a2e56080286ad0970605d590feffbb7 commit 188903bc2a2e56080286ad0970605d590feffbb7 Author: luoe <luoe@chromium.org> Date: Thu Apr 20 01:37:56 2017 DevTools: recognize CSSIdentifiers that start with double hyphen The CSS parser actually recognizes invalid CSSIdentifiers such as "--foo", even though this differs from the spec. This CL let's DevTools recognize these as selectors starting with "--" as identifiers that do not need escaping. BUG= 680139 Review-Url: https://codereview.chromium.org/2830773002 Cr-Commit-Position: refs/heads/master@{#465851} [modify] https://crrev.com/188903bc2a2e56080286ad0970605d590feffbb7/third_party/WebKit/LayoutTests/inspector/elements/elements-css-path-expected.txt [modify] https://crrev.com/188903bc2a2e56080286ad0970605d590feffbb7/third_party/WebKit/LayoutTests/inspector/elements/elements-css-path.html [modify] https://crrev.com/188903bc2a2e56080286ad0970605d590feffbb7/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
,
Apr 20 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by woxxom@gmail.com
, Jan 11 2017