-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix(ngAnimate): ensure that all jqLite elements are deconstructed properly #11760
Conversation
I have two comments—one about the naming of On naming
|
activeAnimationsLookup.remove(element); | ||
var node = getFirstNode(element); | ||
node.removeAttribute(NG_ANIMATE_ATTR_NAME); | ||
activeAnimationsLookup.remove(node); | ||
} | ||
|
||
function isMatchingElement(a,b) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are a
and b
here—jQuery instances of DOM nodes? Do they need to be wrapped/unwrapped before calling isMatchingElement at all call sites?
In |
👍 for having some naming conventions to indicate whether the value is expected to be a DOM node, JQLite object or any. I am not sure that I some projects I have tried prefixing JQLite variables with (But somehow (and without being sure why) I wasn't too happy about it.) |
I thought that the convention in the angular code base was that "wrapped" DOM nodes (i.e. jqLite elements always start with a |
I don't think this is consistently the case in all files (maybe just In practice, I don't like that convention (although it would be indeed very convenient), because everything I particularly hate DDOs with But it's a matter of personal preferrence I guess and it is very common (even in Angular core 😢). |
…perly Prior to this fix if a form DOM element was fed into parts of the ngAnimate queuing code it would attempt to detect if it is a jqLite object in an unstable way which would allow a form element to return an inner input element by index. This patch ensures that jqLite instances are properly detected using a helper method. Closes angular#11658
Merged as 64d0518 |
We'll have another PR in RC2+ which renames things properly. |
Prior to this fix if a form DOM element was fed into parts of the
ngAnimate queuing code it would attempt to detect if it is a jqLite
object in an unstable way which would allow a form element to return an
inner input element by index. This patch ensures that jqLite instances
are properly detected using a helper method.
Closes #11658