$0 randomly replaces the CSSStyleDeclaration object on elements
Reported by
gregory....@gmail.com,
Nov 8 2017
|
||||||||||||
Issue description
Chrome Version : 62.0.3202.89
OS Version: 10.0
URLs (if applicable) : N/A
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Firefox 4.x:OK
Edge 40:OK
What steps will reproduce the problem?
1. Go to any page Example: https://www.google.com
2. Open dev tools
3. (Note* You may need to refresh/clear cache)
4. Select any element in the Elements panel that does not have a style attribute
5. in the console debugger type and hit enter on each code line individually (*note doing them all at the same time gives a different effect)
6. `$0.style.temp = 500;` Prints 500
7. `$0.style.color = '#ccc';` Prints "#ccc"
8. `$0.style.temp` Prints undefined
What is the expected result?
`$0.style.temp` should be defined as `500`
What happens instead of that?
it prints that it is `undefined`
Please provide any additional information below. Attach a screenshot if
possible.
What it looks like is happening is the CSSStyleDecleration is being replaced with a new one in the background. This effect seems to be random and the above steps are the only reproducible method I have found that is easy to reproduce.
by adding the line: `var el = $0;` and using the `el` instead it is not reproduced. neither is it reproduced if you run all lines in the same execution
UserAgentString: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36
component:Platform>Apps>DevTools
,
Nov 9 2017
Unable to reproduce the issue on reported version 62.0.3202.89 and latest canary using Windows 10 by following steps mentioned in original comment. Please find the attached screen-cast and let us know if we have missed any steps in the process of reproducing the issue from TE-end
,
Nov 9 2017
It seems your steps are slightly different, I'm unable to update the ticket steps but here is a video showing the bug in action, I will also upload to show that canary exhibits the same effect
,
Nov 9 2017
Thank you for providing more feedback. Adding requester "divya.padigela@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 9 2017
Here are the results in canary 64.0.3263.0 *Note: it seems the results in canary following the same process as the preceding video ended up causing results to vary and be random, sometimes it worked, sometimes it didn't. adding a quick refresh after the console was opened seemed to make the bug results consistently happen each time.
,
Nov 10 2017
We were able to reproduce it.
,
Nov 13 2017
Able to reproduce this issue on reported version 62.0.3202.89, on latest stable 62.0.3202.94 and on latest dev 64.0.3267.0 using Windows 10, Ubuntu 14.04 and Mac 10.12.6 with steps mentioned in comment#0. This issue is seen from M-50 i.e 50.0.2661.0. Hence considering this issue as Non-regression and marking as Untriaged. Attaching screencast for reference. Removing Needs-Bisect label as this is Non-regression. Thanks!
,
Nov 14 2017
,
Nov 14 2017
,
Nov 14 2017
,
Nov 14 2017
I am not sure this qualifies as Hotlist-Interop, as it is not exposed to web pages (only to the Developer Tools). If there is evidence that it happens to web pages as well, this is indeed an interoperability issue (and a higher priority).
,
Nov 27 2017
This does reproduce outside devtools, it's probably dependent on garbage collection happening.
,
Nov 27 2017
Here's a test case: https://jsfiddle.net/fnvvmktx/
,
Nov 28 2017
,
Nov 28 2017
,
Dec 6 2017
,
May 25 2018
Late response, but to anybody wanting a workaround to this issue, this is a GC issue so simply putting a property somewhere that references the style object will make GC ignore it and this random issue will not persist. Example: `$0.__GCFix__ = $0.style;` |
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by manoranj...@chromium.org
, Nov 8 2017Labels: Needs-Triage-M62