document.styleSheets is not consistent with disabled link elements
Reported by
jsnj...@gmail.com,
Nov 14 2017
|
|||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0 Steps to reproduce the problem: 1. Open https://jsnjack.github.io/stylesheet_list.html 2. Open https://jsnjack.github.io/stylesheet_list_dynamic.html 3. Observe different output on the page What is the expected behavior? The output on the page should be the same (which means that document.styleSheets should return the same data) What went wrong? In step one the link element was part of the HTML code and after it was disabled it still presented in document.styleSheets. In step two the link element was created and added to the page with javascript. If the link is disabled it is not presented in document.styleSheets (Amount of stylesheets: 0) Did this work before? N/A Does this work in other browsers? Yes Chrome version: Version 62.0.3202.89 (Official Build) (64-bit) Channel: stable OS Version: Fedora 26 Flash Version: This behavior is consistent in Firefox and IE (Amount of stylesheets: 1)
,
Nov 15 2017
Unable to reproduce the issue on reported version 62.0.3202.89 using ubuntu 14.04. Please find the attached screen-cast and let us know if we have missed any steps in the process of reproducing issue from TE-end Could you please let us know if this issue is specific to Fedora 26
,
Nov 15 2017
Looks like I uploaded a wrong tests case. Sorry about that! Three test cases: 1. https://jsnjack.github.io/stylesheet_list.html 2. https://jsnjack.github.io/stylesheet_list_dynamic.html 3. https://jsnjack.github.io/stylesheet_list_dynamic2.html So testcases 1,2 work as expected. In #3 you can see `Amount of stylesheets: 0`. The difference in testcase #3 is that the disabled property set to true before the link element is attached to DOM. Firefox 57 in testcase #3 ignores the disabled property and applies styles to the page. IE 11 in testcase #3 shows `Amount of stylesheets: 1`
,
Nov 15 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 15 2017
Able to repro on chrome stable 61.0.3163.100 and chrome canary 64.0.3269.0. This doesn't seem like a CSS issue, moving to HTML>Link
,
Nov 17 2017
Able to reproduce this issue on Mac 10.12.6, Win-10 and Ubuntu 14.04 using chrome reported version #62.0.3202.89 and latest canary #64.0.3271.0. This is a non-regression issue as it is observed from M50 old builds. Hence, marking it as untriaged to get more inputs from dev team. Thanks...!!
,
Nov 27 2017
Can style team handle this issue? This is related to how Blink handles active style sheets.
,
Nov 27 2017
,
Nov 28 2017
,
Dec 6 2017
,
Apr 29 2018
I believe our behavior does not follow the spec, as https://html.spec.whatwg.org/multipage/semantics.html#update-a-style-block says nothing about checking whether the stylesheet is disabled. However, I'm not sure exactly where we perform this check. |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by dtapu...@chromium.org
, Nov 15 2017