-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
Fixes #12956 - Improve cloneFixAttributes function #1034
Conversation
This makes sense too. We only want to use the clearAttributes/mergeAttributes junk on oldIE. |
We only want to use the clearAttributes/mergeAttributes junk on oldIE Do you? From where i'm standing this is not true. If so, and this – but it would affect user events bounded via attachEvent, i'm wondering - is it a real issue? is not a problem, you can eliminate clear(merge)Attributes hack altogether, by using |
For IE9 and higher, we use addEventListener for our own needs, so we don't need it there. It's possible that someone is using attachEvent on their own elements in IE and then cloning the element, is that the case you were concerned about? That is really undefined territory. Anything attached directly with either attachEvent or addEventListener is basically something the user would need to worry about. |
Two things... First, is there a ticket for this? Second, the patch needs to be rebased—Thanks! :) |
@rwldrn First No, do you need one? Second Wait a bit, i will rebase shortly |
We've been over this, yes, please make tickets for bugs/features/changes... everything |
We've been over this, yes, please make tickets for bugs/features/changes... everything Yeah, we did, many times, but i ask because your policy often changes, and sometimes, you push commits without tickets... So, as i understand – de jure i have to, but not de facto. |
|
Doesn't change any jQuery source So? @dmethvin is the leader of the project and has more understanding of the entire code base then anyone else in the world. And? These examples are not the only one, but never mind, i can create tickets if you like. |
@rwldrn Although, if issue is purely with code it would be nice if it was discussed only at github, it's tediously to converse in different places |
"Github Issues" is inadequate for our needs. I'm not interested in arguing about this any further. |
I'm not sure what is being argued, but @Orkel has been working on some of these tickets for a while. They just got tangled up with some other pull requests in the same vicinity. |
This still needs to be rebased. done. It's possible that someone is using attachEvent on their own elements in IE and then cloning the element, is that the case you were concerned about? Yep. Anything attached directly with either attachEvent or addEventListener is basically something the user would need to worry about. OK, then let's try new approach, i added more tests, just in case. |
So what should we do with gh-1036? Do you want to rebase that after this lands? |
Do you want to rebase that after this lands? or vice-versa, whatever you decide... |
@jquerybot retest |
Fixes issue in non IE browsers that happen to come down this path
Fixes issue in non IE browsers that happen to come down this path
…h-1034. Remove clear(merge)Attributes hack
Events bounded via addEventListener will not be cloned in IE, events bounded via attachEvent will, but in IE9-10, jQuery does not use attachEvent method and even if it did, clear(merge)Attributes hack would not work for those events anyway.
So for new IE, there is no reason to use this hack.
Expando property is not cloned in IE9-10 and it might not exist at all, but removeAttribute method is expensive to use, it would be better to check for existence of expando before trying to remove it.
I would perform clear(merge)Attributes hack only if expando property is exist, but it would affect user events bounded via attachEvent, i'm wondering - is it a real issue?
/cc @dmethvin