Bug Tracker

Opened 5 years ago

Closed 5 years ago

#15159 closed bug (migrated)

Show animations, like $.show() $.toggle() and $.slideDown(), don't respect css display property if initial state is display:none;

Reported by: nicholasbg Owned by:
Priority: low Milestone: None
Component: effects Version: 1.11.1
Keywords: display inline block none style default show toggle slide animation Cc:
Blocked by: Blocking:

Description

When an element that has a class with a css display property that is not its default (for example a <span> with "display:block"), and has an inline style (like "display:none"), setting it to be displayed with something like $.toggle(200) will cause it to not use the class's display property, while $.toggle() will work properly. Even $.toggle(0) will exhibit this behaviour.

From what I can tell this bug was introduced in 1.11.0/2.1.0

This jsFiddle will demonstrate the bug... http://jsfiddle.net/e8kpg/

You can see it working normally if you change the jQuery version to something before 1.11.0/2.1.0 or remove the 200 from .toggle(200).

This is a very similar case to...

Ticket #14824 http://bugs.jquery.com/ticket/14824

Change History (2)

comment:1 Changed 5 years ago by dmethvin

Component: unfiledeffects
Priority: undecidedlow
Status: newopen
Version: 2.1.01.11.1

We have entirely too much magic up in here.

comment:2 Changed 5 years ago by m_gol

Resolution: migrated
Status: openclosed
Note: See TracTickets for help on using tickets.