Bug Tracker

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#13310 closed bug (fixed)

hide() and fadein() corrupt the css display value

Reported by: shayan2370@… Owned by:
Priority: high Milestone: 1.9.1
Component: css Version: 1.9.0
Keywords: Cc: orkel, dmethvin
Blocked by: Blocking:


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 4 years ago by mikesherov

Component: unfiledcss
Milestone: None1.9.1
Priority: undecidedhigh
Status: newopen

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.

comment:2 Changed 4 years ago by mikesherov

Cc: orkel dmethvin added

comment:3 Changed 4 years ago by dmethvin

@orkel, can you take a look at this?

comment:4 Changed 4 years ago by markelog

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.

PR's – 1.9.1, 2.0

Last edited 4 years ago by markelog (previous) (diff)

comment:5 Changed 4 years ago by Oleg

Resolution: fixed
Status: openclosed

Fix #13310. Get the right display value for disconnected nodes. Close gh-1155.

Changeset: 8226666b1344b27f22f3f0699586054a20718ad3

comment:6 Changed 4 years ago by Oleg

Fix #13310. Get the right display value for disconnected nodes. Close gh-1156.

Changeset: f3db084f7cc73379b0d6f5341c987e2a801ea032

Note: See TracTickets for help on using tickets.