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

Wait for the expected target during a collapse #13330

Merged
merged 1 commit into from
Apr 16, 2014
Merged

Conversation

Kronuz
Copy link
Contributor

@Kronuz Kronuz commented Apr 12, 2014

Actually wait for the collapsed item to complete. If complete is called
with other target, instead of simply returning and do nothing, wait again
until the proper target triggers the event (otherwise this leaves collapse
in a broken state).

Actually wait for the collapsed item to complete. If complete is called
with other target, instead of simply returning and do nothing, wait again
until the proper target triggers the event (otherwise this leaves collapse
in a broken state).
@cvrebert cvrebert added the js label Apr 12, 2014
@cvrebert
Copy link
Collaborator

It'd be great if you could add a unit test to exercise this.

@Kronuz
Copy link
Contributor Author

Kronuz commented Apr 13, 2014

I have never added unit tests for JavaScript and I wouldn't know how to at the moment. It happened, the problem, when the div being collapsed has an input inside, with a focus... that's when it happened to me

@cvrebert cvrebert added this to the v3.2.0 milestone Apr 13, 2014
@Kronuz
Copy link
Contributor Author

Kronuz commented Apr 13, 2014

Still it's pretty obvious, the .one(...) just returns doing nothing, and never again receives the event as it returns without scheduling a "try waiting again"... so the collapsible div remains forever in "collapsing" state...

@fat
Copy link
Member

fat commented Apr 16, 2014

yep this is fine, (also hard to add a unit test because of transition)

lgtm – should merge

@fat
Copy link
Member

fat commented Apr 16, 2014

@Kronuz thanks for doing this 👍

cvrebert added a commit that referenced this pull request Apr 16, 2014
Wait for the expected target during a collapse
@cvrebert cvrebert merged commit d08f7dd into twbs:master Apr 16, 2014
@mdo mdo mentioned this pull request Apr 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants