In the inspector, the selection of double class name create a carriage return when paste
Reported by
j...@logic-sunrise.com,
Feb 13 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.37 Safari/537.36 Steps to reproduce the problem: 1. Open https://www.pornfoxvr.com 2. Inspect any homepage video 3. select a double class name and copy it (like: ".video .tile") (4) once the selection is pasted, a carriage return is created in the selection. What is the expected behavior? Not include a carriage return in my selection, and keep the selection on the same line. What went wrong? a carriage return is created in my selection Did this work before? N/A Chrome version: 57.0.2987.37 Channel: stable OS Version: Mint Serena Flash Version: I also tried to reproduce this bug on another website, but can't find (that's why I paste my URL), sorry for content. I also tried to check sublime text, if thes spaces are not special caracters, but no.
,
Feb 15 2017
Thank you for the report. I'm able to reproduce on 58.0.3010.0 windows. An alternative HTML file is attached with the same repro. Right click inspect on "footest" and click on the ".video .tile" in the rule name in the styles sidebar pane. DevTools is matching the selected CSS rule and displaying it normally without whitespace. Clicking on the selector reveals an input field with the actual carriage return, which is actually present in the source. If many users have CSS minification steps that lead to line breaks in rules, perhaps we can replace line breaks with spaces before setting the input field text.
,
Feb 15 2017
I inspect your .html, and you wrote a carriage return. In my case, my .css doesn't have (attachment). I also checked the space between the 2 classes, and it's a normal space caracter (not a tab or special caracter.
,
Feb 15 2017
Ok, I targeted the bug. I have a minifyer that create for multi classes a carriage return. Your last example (doubleClass.html) target the real bug at the end. My question is: how the chrome inspector should react? Because it displays it correctly, should not change when select, right?
,
Feb 15 2017
luoe@: Could you please update the thread with respect to the above comment and let us know the actual and expected result of it, if it can be triaged from TE side.
,
Feb 15 2017
Since DevTools doesn't know whether the CSS file is minified or not, I think it's reasonable for it to paste out the actual match with a line break. (It doesn't appear broken before a click because we don't have white-space: pre). I think the better way to go about this is to use CSS sourcemaps. lushnikov@, would sourcemaps lead to the original style selectors in SSP?
,
Feb 15 2017
Ok, understandable. Fixing the minifying output is the proper solution. thing that we can hardly debug now ;)
,
Feb 17 2017
Sure, sourcemaps should point correctly. Closing this since devtools are behaving properly. |
|||
►
Sign in to add a comment |
|||
Comment 1 by ajha@chromium.org
, Feb 14 2017