Bug Tracker

Modify

Ticket #3585 (closed bug: invalid)

Opened 5 years ago

Last modified 15 months ago

fadeOut incorrectly sets display:none

Reported by: wichert Owned by:
Priority: major Milestone: 1.3.2
Component: effects Version: 1.3.1
Keywords: Cc: wichert, flesler
Blocking: Blocked by:

Description

fadeOut is document to only set modify the opacity. However a test with jQuery 1.2.6 shows that after having animated to an opaicty of 0 it sets a display:none on the element(s), which has many undesirable side effects.

Change History

comment:1 Changed 5 years ago by flesler

  • Cc wichert, flesler added

I agree. Can you post about this to the jQuery dev group ?

comment:2 Changed 5 years ago by scott.gonzal

I don't see how display: none is undesirable. I think this is the most commonly expected behavior.

comment:3 Changed 4 years ago by carpii

You can work around this feature by using fadeTo("fast", 0);

This will fade the element, and set visibility to hidden, however it will leave 'display' intact and thus wont disrupt the flow of your document

comment:4 Changed 4 years ago by carpii

However it works though, please can we update the api docs for fadeIn/fadeOut?

They do say it only affects opacity, and a brief google shows quite a few people are falling foul of the same assumption

comment:5 Changed 4 years ago by dmethvin

I would think fadeOut sets display: none because otherwise the element would pass the :visible test. Or is it a bug that opacity: 0 is :visible?

comment:6 Changed 4 years ago by john

  • Status changed from new to closed
  • Version changed from 1.2.6 to 1.3.1
  • Resolution set to invalid
  • Milestone changed from 1.3 to 1.3.2

This is definitely the intended behavior - and the docs are up to date, as well.

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.