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

Collapse animation jumps if an input field holds the focus #9836

Closed
anormal81 opened this issue Aug 19, 2013 · 6 comments
Closed

Collapse animation jumps if an input field holds the focus #9836

anormal81 opened this issue Aug 19, 2013 · 6 comments
Labels
Milestone

Comments

@anormal81
Copy link

I have two panels with forms and input fields. A button click triggers the collapsing of the first form and the expansion of the second one. The animation works fine if no input field has focus.

Try the example at http://jsfiddle.net/ZbAsN/1/
Set the cursor into the username text box an click the "create new user" button. The panel quickly jumps to the end position. Click "cancel" to return to the first panel.

Retry the same without focus in a text box. The animation will be executed as expected.

In addition: a slower click on the "create new user" button will transfer the focus to the button before the animation starts. The result looks like the expected behaviour.

@fat
Copy link
Member

fat commented Aug 19, 2013

oh yeah it's catchin the wrong transition end… interesting

@zlatanvasovic
Copy link
Contributor

@anormal81 You can't use collapse animation when an element is focused. When you click on a collapse button — it's focus — and one focus breaks another focus.

Fix: avoid clicking on collapse button when another element is focused.

@zlatanvasovic
Copy link
Contributor

@fat Hey, any news? 👯

@cvrebert cvrebert modified the milestones: v3.2.0, v3.1.1 Feb 9, 2014
@fat
Copy link
Member

fat commented Mar 9, 2014

the fix is to check that the target is the collapsing element. i'll fix this now

@fat fat closed this as completed in 4d96e69 Mar 9, 2014
mdo added a commit that referenced this issue Mar 9, 2014
@mdo mdo mentioned this issue Mar 9, 2014
@vsn4ik
Copy link
Contributor

vsn4ik commented Mar 9, 2014

After fix issue, example code not work correct (collapse not work). I used data-target attribute.

http://jsfiddle.net/SJ7Ug
Reproduce issue:

  1. Focuse input (if unfocused) in panel-body 1.
  2. Click on panel 1 heading link to collapse.
  3. Click again on panel 1 heading link (collapse not work).

@vsn4ik
Copy link
Contributor

vsn4ik commented Apr 16, 2014

Fixed after #13330.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants