-
-
Notifications
You must be signed in to change notification settings - Fork 113
Edge wipes static classname if id is dynamic #221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Edge, like the entire IE legacy, has so many workarounds for attributes you'd be surprised ... however, I gotta ask you something: why on earth would you need a dynamic ID ? IDs are a very static/unique delicate matters on a page, I strongly suggest you don't do that, regardless this bug I'll eventually try to fix. |
I am slightly disgusted by the Edge issue I've just filed: You can find the minimal amount of code needed to make it fail: I am not sure this is worth a fix if they act before next Edge upgrade ... IE doesn't seem to be affected though, IE8 works like a charm (probably first time in my life I say that). |
@voces this has been fixed, together with The second bug is here: chakra-core/ChakraCore#4970 The ID work around is tested and now covered. The script work around is ... I don't know, today I'm speechless regarding MS Edge. |
Turned out I didn't. I originally had the ID set to something along the lines of |
No, this is actually a valid reason I didn't think about.
Thank you for that. Even if this is an Edge bug, I've written a workaround for hyperHTML and file a bug in Edge browser so ... it's fixed! Everybody wins here 🎉 |
Damn! They not fixed that. Try this pen in Edge https://codepen.io/WebReflection/pen/dmrKyO |
I am unsure if this is specific to hyperHTML, but I've been running into this annoying bug that only seems to occur on Edge. If I specify an element's
id
dynamically, the class is set to""
ifclass
is statically defined.The following work as expected:
<div id="test" class="test">Test</div>
<div id=${"test"} class=${"test"}>Test</div>
<div data-test=${"test"} class="test">Test</div>
The following does not:
<div id=${"test"} class="test">Test</div>
Here is a live JSFiddle example.
Generating this minimal, complete, and verifiable example led to working example 2, which is a fine, if ugly, workaround I can live with. I suspect this is entirely a third party (Edge) issue.
The text was updated successfully, but these errors were encountered: