Skip to main content

Bug Tracker

Side navigation

#4194 closed bug (fixed)

Opened February 19, 2009 04:22PM UTC

Closed October 27, 2010 01:26AM UTC

Last modified December 12, 2012 06:03PM UTC

show() sometimes uses wrong display type

Reported by: jeremy.cloud Owned by:
Priority: high Milestone: 1.4.4
Component: effects Version: 1.3.1
Keywords: Cc:
Blocked by: Blocking:
Description

If you call hide() on an element that already has style="display: none", but which has a CSS declared display value that differs from the default, and then later call show() on that element, the resulting display type of the element is the default display value for that element, rather than the display value specified in the CSS rule.

This is a regression in 1.3.*, as it worked correctly in 1.2.6. I have attached a simple test case that demonstrates this bug.

Attachments (1)
  • index.html (0.6 KB) - added by jeremy.cloud February 19, 2009 04:23PM UTC.

    Test Case

Change History (5)

Changed February 19, 2009 04:47PM UTC by jeremy.cloud comment:1

This seems to work as a workaround to this bug:

jQuery.fn.superHide = jQuery.fn.hide;
jQuery.fn.hide = function() {
    return this.each(function() {
        var $this = $(this);
        if ($this.css('display') != 'none') {
            $this.superHide();
        }
    });
};

Changed August 08, 2009 02:30AM UTC by dmethvin comment:2

component: unfilledfx

Changed October 27, 2010 01:26AM UTC by rwaldron comment:3

milestone: 1.3.21.4.4
priority: criticalhigh
resolution: → fixed
status: newclosed

Issue no longer exists:

http://jsfiddle.net/rwaldron/YDhwb/2/

Changed December 12, 2012 05:55PM UTC by mlhDevelopment@gmail.com comment:4

I was able to repro - what does that mean?

http://jsfiddle.net/mlhDevelopment/YDhwb/3/

Changed December 12, 2012 06:03PM UTC by rwaldron comment:5

Thanks but that test case only proves that doing the wrong thing produces a "broken" result.