Skip to main content

Bug Tracker

Side navigation

#13310 closed bug (fixed)

Opened January 23, 2013 02:21PM UTC

Closed February 04, 2013 08:16PM UTC

Last modified February 04, 2013 08:24PM UTC

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

Reported by: shayan2370@gmail.com 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/

Attachments (0)
Change History (6)

Changed January 26, 2013 08:43PM UTC by mikesherov comment:1

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.

Changed January 26, 2013 08:46PM UTC by mikesherov comment:2

cc: → orkel, dmethvin

Changed February 01, 2013 03:04AM UTC by dmethvin comment:3

@orkel, can you take a look at this?

Changed February 01, 2013 03:00PM UTC by markelog comment:4

_comment0: 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 save the old display even if it defined this way. \ \ PR's – [https://github.com/jquery/jquery/pull/1155 1.9.1], [https://github.com/jquery/jquery/pull/1156 2.0]1359730844762443

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

Changed February 04, 2013 08:16PM UTC by Oleg comment:5

resolution: → fixed
status: openclosed

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

Changeset: 8226666b1344b27f22f3f0699586054a20718ad3

Changed February 04, 2013 08:24PM UTC by Oleg comment:6

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

Changeset: f3db084f7cc73379b0d6f5341c987e2a801ea032