Issue metadata
Sign in to add a comment
|
getComputedStyle(testDiv, null).getPropertyValue("content") returning 'normal' with latest chrome 67
Reported by
satyanar...@gmail.com,
Jun 5 2018
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36 Steps to reproduce the problem: 1. Run the attached code in console 2. 3. What is the expected behavior? It should return/print empty string What went wrong? It's returning/printing 'normal' which isn't expected Did this work before? Yes 66 Does this work in other browsers? N/A Chrome version: 67.0.3396.62 Channel: stable OS Version: 8.1 Flash Version: Similar to Chrome 51 issue: https://bugs.chromium.org/p/chromium/issues/detail?id=609848
,
Jun 5 2018
The new behavior was introduced in 11fb2ae26b6e84211adf8270eb4f0cf42b945fe8 (67.0.3365.0) and it correctly implements the specification. Computed value on elements is by default 'normal' and on :before and :after computes to 'none' Spec: https://www.w3.org/TR/CSS2/generate.html#content
,
Jun 5 2018
,
Jun 5 2018
,
Jun 6 2018
Able to reproduce the issue on Windows 10, mac 10.13.3 and Ubuntu 17.10 using chrome reported version #67.0.3396.62 and latest canary #69.0.3451.0. This seems to be an intended behaviour as per comment #2 that was introduced in 11fb2ae26b6e84211adf8270eb4f0cf42b945fe8 (67.0.3365.0). ccing ramya.v@ for further inputs on this issue. Thanks...!!
,
Jun 6 2018
Thanks all for the quick response. Might be third party libraries might have designed based on the browser response for the earlier versions (seems to be other browsers didn't implement this way). I will also check if libraries have any update.
,
Jun 6 2018
Issue 849984 has been merged into this issue.
,
Jun 6 2018
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by satyanar...@gmail.com
, Jun 5 2018below is the code snippet to check the issue ---------------------- function testElementStyle(tag, id, property){ // test an element's style var docElement = document.documentElement; var testDiv = docElement.insertBefore(document.createElement(tag), docElement.firstChild); testDiv.id = id; var styleValue = (testDiv.currentStyle || getComputedStyle(testDiv, null))[property]; docElement.removeChild(testDiv); return styleValue; } var parser = testElementStyle('x-parse', null, 'content'); console.log(parser); ------------------------