-
Notifications
You must be signed in to change notification settings - Fork 20.6k
Animated toggle() turns display:inline into display:inline-block #2071
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
Comments
This looks correct to me. The What did you expect to happen? |
Basically, the problem is that calling toggle() twice doesn't leave it in the state it was before - it's permanently turned into an inline-block element, even after the animation is over. It can be worked around by explicitly resetting the element back to inline after the animation is done, though. |
@cburschka I am having the same issue. Whenever I call toggle, the hiding aspect works fine. However, when toggling back to show the hidden content, the inline style of As @cburschka, it can be worked around by explicitly resetting the element back to inline after the animation is done. |
There's an example here: http://jsfiddle.net/cburschka/ve5fbujq/
The non-animated
toggle()
appears to work normally. An animation liketoggle('slow')
will put adisplay:inline-block
property on the<span>
element, which in the above example causes the red text to drop to a new line instead of wrapping normally.This happens whether or not the span was explicitly set to display:inline earlier, or was just inheriting the default value.
This bug seems similar to #1774 (apparently closed prior to the release of 2.1.3), but isn't quite the same.
The text was updated successfully, but these errors were encountered: