Bug Tracker

Modify

Ticket #11755 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

animate and it aliases should not use :hidden selector

Reported by: markel Owned by:
Priority: low Milestone: 1.8
Component: effects Version: 1.7.2
Keywords: Cc:
Blocking: Blocked by:

Description

There four cases in which elements considered to be hidden, when ":hidden" selector used, according to documentation –

They have a CSS display value of none.
They are form elements with type="hidden".
Their width and height are explicitly set to 0.
An ancestor element is hidden, so the element is not shown on the page.

And there is fifth one, which is not mentioned in documentation – elements is considered to be hidden when they disconnected from the document –  http://jsfiddle.net/jeDrX/

animate and it aliases use ":hidden" selector to know when element is hidden, but in those five cases animate should look only for the first one (but not for jQuery.fn.show case), i don't see a reason to look for another four, this change will cost some bytes, but i think its worth it, it will cause less confusion – http://bugs.jquery.com/ticket/11585, and it will be faster –  http://jsperf.com/hidden-vs-jquery-css-elem-display

Change History

comment:1 Changed 2 years ago by gnarf

  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to effects
  • Milestone changed from None to 1.8

comment:3 Changed 2 years ago by Oleg

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

Fix #11755. Avoid :hidden selector for animations. Closes gh-774.

Changeset: ae20e732f02c7e3bdd76324979b1a816c567ec22

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.