Bug Tracker

Modify

Ticket #13310 (closed bug: fixed)

Opened 15 months ago

Last modified 15 months ago

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
Blocking: Blocked by:

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

comment:1 Changed 15 months ago by mikesherov

  • Priority changed from undecided to high
  • Status changed from new to open
  • Component changed from unfiled to css
  • Milestone changed from None to 1.9.1

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 15 months ago by mikesherov

  • Cc orkel, dmethvin added

comment:3 Changed 15 months ago by dmethvin

@orkel, can you take a look at this?

comment:4 Changed 15 months 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 15 months ago by markelog (previous) (diff)

comment:5 Changed 15 months ago by Oleg

  • Status changed from open to closed
  • Resolution set to fixed

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

Changeset: 8226666b1344b27f22f3f0699586054a20718ad3

comment:6 Changed 15 months ago by Oleg

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

Changeset: f3db084f7cc73379b0d6f5341c987e2a801ea032

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.