Bug Tracker

Modify

Ticket #104 (closed bug: fixed)

Opened 7 years ago

Last modified 6 years ago

bug with hide()/show() when hide() is called more than once before show(), solution is provided

Reported by: Jörn Owned by:
Priority: critical Milestone: 1.0
Component: core Version: 1.0a
Keywords: Cc:
Blocking: Blocked by:

Description

In my scenario an element was display 'list-item' was hidden more than once before is was displayed. The effect was that it was shown with display:block instead if list-item.

My solution to this problem is quite simple. Just change the first line inside the classic (non-animated) hide function to this:

this.oldblock = this.oldblock
jQuery.css(this,"display");

Now hide() takes into account if it was hidden before and does not overwrite this.oldblock in that case.

A test for this bug should look like this: <ul id="testul"><li>blabla</ul></li>

assertTrue($('#testul li').hide().hide().show()[0].style.display == 'list-item');

Change History

comment:1 Changed 7 years ago by Jörn

  • Priority changed from major to critical

comment:2 Changed 7 years ago by john

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in SVN rev 165.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.