Opened 14 years ago
Closed 13 years ago
#5130 closed bug (fixed)
show() sets "display:block" to inline element.
Reported by: | DanTheMan | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | effects | Version: | 1.4a1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
How to reproduce:
- create inline element
- hide element
- add element to DOM using after()
- show element
The element now has style display set to block. Please see test page for a proof of concept.
Workaround: add the element to DOM before hiding it.
- create inline element
- add element using after()
- hide element
- show element
But that may lead to a flickering effect.
Attachments (1)
Change History (5)
Changed 14 years ago by
Attachment: | jquery-show.html added |
---|
comment:1 Changed 14 years ago by
Forgot to mention: bug applies to Firefox
Internet explorer does not exhibit this problem.
comment:2 Changed 14 years ago by
Nobody interested?
How can I improve this bug report so developers are happy with it?
comment:3 Changed 14 years ago by
The fix for this is to replace:
// Reset the display this.elem.style.display = this.options.display;
with
var old = jQuery.data(this.elem, "olddisplay"); this.elem.style.display = old ? old : this.options.display;
In fx.js in jQuery.fx.prototype.step
comment:4 Changed 13 years ago by
Component: | unfilled → fx |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Version: | 1.3.2 → 1.4a1 |
Note: See
TracTickets for help on using
tickets.
Testcase: hide() , after(), show() makes inline element to block-level element.