Skip to content
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

math tag clone's tag name is "MATH" instead of "math" #3642

Open
himajasuman opened this issue Apr 25, 2017 · 5 comments
Open

math tag clone's tag name is "MATH" instead of "math" #3642

himajasuman opened this issue Apr 25, 2017 · 5 comments
Assignees
Milestone

Comments

@himajasuman
Copy link

@himajasuman himajasuman commented Apr 25, 2017

Description

When a div with math elements is cloned, math elements were cloned with with tagName "MATH" instead of "math" which is making clone.getElementsByTagName('math') is returning null.

Link to test case

https://jsfiddle.net/3fa8fjgh/3/

@alecpl
Copy link

@alecpl alecpl commented Apr 25, 2017

For me it is "MATH" tags in clone 0 in Firefox and Chrome. What browser?

@himajasuman
Copy link
Author

@himajasuman himajasuman commented Apr 25, 2017

In IE 11

@mgol
Copy link
Member

@mgol mgol commented Apr 25, 2017

Thanks for the report! Confirmed: https://output.jsbin.com/fedodip. The problem exists in IE 11 & 10 but not in IE 9. This is an issue with the getElementsByTagName in IE 10-11 which Sizzle uses but it doesn't happen with querySelectorAll. Maybe we should not prefer it to querySelectorAll if it exists, at least in IE? What do you think, @gibson042?

@mgol mgol added this to the 3.3.0 milestone Apr 25, 2017
@gibson042
Copy link
Member

@gibson042 gibson042 commented May 1, 2017

It seems like there's a .clone issue (which might not be fixable), and a separate selector issue. I hope to fix the selector issue by abandoning getElementsByTagName.

@markelog
Copy link
Member

@markelog markelog commented May 1, 2017

I hope to fix the selector issue by abandoning getElementsByTagName.

If you try this approach, would you mind providing perf tests?

@timmywil timmywil removed this from the 3.3.0 milestone Nov 13, 2017
@timmywil timmywil added this to the 3.4.0 milestone Nov 13, 2017
@timmywil timmywil removed this from the 3.4.0 milestone Sep 24, 2018
@timmywil timmywil added this to the 4.0.0 milestone Sep 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants