#12726 closed bug (duplicate)
is(':active') reports false even if button is active
Reported by: | 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/
Change History (2)
comment:1 Changed 11 years ago by
Component: | unfiled → selector |
---|---|
Milestone: | None → 1.9 |
Priority: | undecided → low |
Resolution: | → duplicate |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
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.