Bug Tracker

Opened 11 years ago

Closed 11 years ago

#11755 closed enhancement (fixed)

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


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 (3)

comment:1 Changed 11 years ago by gnarf

Component: unfiledeffects
Milestone: None1.8
Priority: undecidedlow
Status: newopen

comment:3 Changed 11 years ago by Oleg

Resolution: fixed
Status: openclosed

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

Changeset: ae20e732f02c7e3bdd76324979b1a816c567ec22

Note: See TracTickets for help on using tickets.