Major Bug: Dynamic stylesheet not applied if HREF attribute is not in last position

Not reproducible Issue #10258970


Reddy B.
Dec 17, 2016
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 3 people

Sign in to watch or report this issue.

Steps to reproduce

When adding a stylesheet dynamically inside the body tag, if the href attribute is not in last position, the stylesheet won’t be applied.

<link href="mystylesheet.css" rel="stylesheet" type="text/css">

Won’t work but :

<link rel="stylesheet" type="text/css" href="mystylesheet.css">

Will work.

This is a major problem as attributes order should not matter - really world situation : MVVM Library/Framework do not expose an API to reorder attributes since there should be no need for it.

Not : the stylesheet needs to be added dynamically for the problem to show up.


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

    • Just checking to see the status of this, our application is absolutely broken in Edge because the styles being loaded are vital (we style blogs)

    • How long does it usually to address this kind of bug ?

    • This is related to :
      This is a very common scenario, please do update us asap

    • Are you able to provide us with a bit more context? I tried to create a repro based on your details and came up with this:

      But in both Edge and Chrome the stylesheet is appended as one would expect. And unless I am missing something this stylesheet is being loaded dynamically (on page load).

      Do you believe this to be unique to extensions? Are you able to provide us with a reduced case for the extension?

    • Microsoft Edge Team

      Changed Status to “Not reproducible”

    • Hello,

      We are unable to reproduce the problem you see. Please reopen this case when you can provide us with a code sample to test. Thank you so much for your assistance with this issue.

      Best Wishes,
      The MS Edge Team

    • Hello,

      I have the same issue.

      The stylesheet is loaded dynamically in an iframe.
      I have tried to inject the stylesheet with several ways, but none was successfully applied.

      I can see the stylesheet via DOM inspector, however, none of the style rules are applied in the iframe document.

      You may have a look here

      Please let me know if you looking into it and an ETA.

      Thank you,
      Anna Markomanolaki

    You need to sign in to your Microsoft account to add a comment.

    Sign in