Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#12726 closed bug (duplicate)

is(':active') reports false even if button is active

Reported by: a@… Owned by:
Priority: low Milestone: 1.9
Component: selector Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:


is(':active') will report false for button in active state. $('*:active') will still select this element as active. Workaround: use $('*:active').filter(el).length > 0 instead of $(el).is(:active).

In code: el.is(':active') == $('*:active').filter(el).length > 0; should always be true. It is not.

Example fiddle: http://jsfiddle.net/atotic/HzSY6/

Change History (2)

comment:1 Changed 11 years ago by Timmy Willison

Component: unfiledselector
Milestone: None1.9
Priority: undecidedlow
Resolution: duplicate
Status: newclosed

Confirmed. There is a bigger issue with :active here.


I think we should look into alternate implementations (possibly including an event) for this selector in 1.9.

Porting this to Sizzle issue.

Note: See TracTickets for help on using tickets.