Skip to main content

Bug Tracker

Side navigation

#104 closed bug (fixed)

Opened July 26, 2006 09:21AM UTC

Closed July 28, 2006 04:55AM UTC

Last modified June 20, 2007 03:00AM UTC

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:
Blocked by: Blocking:
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');

Attachments (0)
Change History (2)

Changed July 26, 2006 09:21AM UTC by Jörn comment:1

priority: majorcritical

Changed July 28, 2006 04:55AM UTC by john comment:2

resolution: → fixed
status: newclosed

Fixed in SVN rev 165.