-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Collapse plugin - issues with transition end event bubbling #13157
Comments
What OS and browser have you seen this problem with? |
Sorry I've been trying to get my head around what was causing my issues but I think I've worked it out. If you have a transitioned child element within the trigger for the collapse, it seems to break the animation at some point. I think this is due to the event bubbling for transition end perhaps? It also means the event target (e.target) is incorrect which locks up the whole thing. Here's my js fiddle: Sorry the title may be misleading now. Cheers |
Sorry, I forgot to add, obviously removing the transition on that element fixed it for me. It was a tough one to work out. Event bubbling is a right git. |
With a little more digging, I've discovered this problem will effect any child element within the collapse with transitions. It can be solved by changing the event binding for the hide method from .one(...) to .on(...) for transition end. The callback itself handles whether the event.target is the correct element anyway and returns if it isn't correct element. The problem is, if it only fires once then it'll never fire again if using .one(...). Sorry if it's a little confusing. It's more for others that might be running into the same problem. |
should have been fixed with this 4d96e69 |
hm i think im confused… let me trying treading through this thread 1 more time |
oh gotcha, ya should be |
Sorry mate. It was a bit of a brain dump. Got there in the end ! |
heh no problem |
fixes #13157 - Collapse plugin - issues with transition end event bubbli...
* upstream/master: (298 commits) add ie-emulation-modes-warning.js to docs & examples Minor Spacing fixes Run `grunt`. Update holder.js to v2.3.2. Update JSZip to v2.2.1. Carousel.slide: rename e => slideEvent change 'slid' comments per @fat's feedback Document that @import-ing Bootstrap can break the icon font path fix twbs#13427 add IE warning scripts to linter config remove semicolons :'-( add script to warn folks trying to test old IE using IE's unreliable emulation modes Document .direction & .relatedTarget properties of Carousel events. Fixes twbs#13395 Add direction & relatedTarget properties to slid.bs.carousel event Fixes #13393 document that show-ing a tooltip/popover on a hidden element doesn't work; fixes twbs#13362 README: Authors => Creators the master branch is the relevant one for current build status Add missing word. fixes twbs#13157 - Collapse plugin - issues with transition end event bubbling document that non-:visible scrollspy targets are ignored; fixes twbs#13394 ... Conflicts: dist/css/bootstrap-theme.css dist/css/bootstrap-theme.min.css dist/css/bootstrap.css.map dist/css/bootstrap.min.css less/variables.less
See below posts for the cause and potential fix for this issue. It appears that child elements with transitions can effect the hide method within the plugin, causing the collapse to "lock" and work intermittently.
The text was updated successfully, but these errors were encountered: