I bound a transitionend
event to div1
. When div1
's transition was end, the event ran. There's no problem.
I encountered a special case:
I added 3 paragraphs to this div1
, when each paragraph's transition is ended, div1
's transitionend
event also ran. So the transitionend
event ran 4 times. >.<
In div1
's transitionend
event's listener function's body, I can see that event.target
!== this
. I feel it's pretty ridiculous!
Chrome and Firefox both has this problem. So I guess this is not a browser's HTML5 spec implementation bug.
Can anyone explain why an element's transitionend
event also can be triggered by this element's children element?
Thank you.