#13310 closed bug (fixed)
hide() and fadein() corrupt the css display value
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | 1.9.1 |
Component: | css | Version: | 1.9.0 |
Keywords: | Cc: | orkel, dmethvin | |
Blocked by: | Blocking: |
Description
Hi
In previos versions of jquery (1.8.3 or 1.7.2) when I set an element's display value to inline-block and hid and faded it in, the display value wasn't changed after. But In 1.9.0, jquery changes display value and after fading the element in, doesn't replace the previous display value.
This is with jquery 1.8.3 and it works fine. but if you change the framework to jquery 1.9.0 you'll see the problem.
http://jsfiddle.net/drustTheCoder/5MzSR/7/
Change History (6)
comment:1 Changed 10 years ago by
Component: | unfiled → css |
---|---|
Milestone: | None → 1.9.1 |
Priority: | undecided → high |
Status: | new → open |
comment:2 Changed 10 years ago by
Cc: | orkel dmethvin added |
---|
comment:4 Changed 10 years ago by
That's pretty weird use-case and it's not really a regression – this example will fail in 1.8.3 for FF as well, but yeah, jQuery should save the old display even if it defined this way.
comment:5 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Fix #13310. Get the right display value for disconnected nodes. Close gh-1155.
Changeset: 8226666b1344b27f22f3f0699586054a20718ad3
comment:6 Changed 10 years ago by
Fix #13310. Get the right display value for disconnected nodes. Close gh-1156.
Changeset: f3db084f7cc73379b0d6f5341c987e2a801ea032
This bug was introduced by the fix for #10416, here: https://github.com/jquery/jquery/commit/bea5ecbba72f22e8924186d9b81839122ec86aef
It's because detached elements can have directly applied styles, which is what the author is intending. Detached elements are super annoying. The test case works if the user appends before hiding: http://jsfiddle.net/5MzSR/9/
orkel, dmethvin, thoughts? Marking as open until you guys respond.