#4194 closed bug (fixed)
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)
Change History (6)
Changed 14 years ago by
Attachment: | index.html added |
---|
comment:1 Changed 14 years ago by
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(); } }); };
comment:2 Changed 13 years ago by
Component: | unfilled → fx |
---|
comment:3 Changed 12 years ago by
Milestone: | 1.3.2 → 1.4.4 |
---|---|
Priority: | critical → high |
Resolution: | → fixed |
Status: | new → closed |
Issue no longer exists:
comment:5 Changed 10 years ago by
Thanks but that test case only proves that doing the wrong thing produces a "broken" result.
Note: See
TracTickets for help on using
tickets.
Test Case