Skip to main content

Bug Tracker

Side navigation

#12726 closed bug (duplicate)

Opened October 15, 2012 06:14AM UTC

Closed October 15, 2012 12:40PM UTC

Last modified October 15, 2012 12:42PM UTC

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

Reported by: a@totic.org Owned by:
Priority: low Milestone: 1.9
Component: selector Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:
Description

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/

Attachments (0)
Change History (2)

Changed October 15, 2012 12:40PM UTC by timmywil comment:1

component: unfiledselector
milestone: None1.9
priority: undecidedlow
resolution: → duplicate
status: newclosed

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

http://jsfiddle.net/HzSY6/8/

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

Porting this to Sizzle issue.

Changed October 15, 2012 12:42PM UTC by timmywil comment:2