Opened 11 years ago
Closed 11 years ago
#10148 closed bug (fixed)
hidden inputs are not :enabled in IE6/7
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | selector | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I would expect that is(':enabled')
implies !is(':disabled')
and vice versa, and this seems to be the case in most browsers. However, in IE 7.0.5730.13, my test case fails when it finds an <input type="hidden"> element that is apparently neither enabled nor disabled.
Link to test case: http://jsfiddle.net/joshuaecook/3fvJ7/1/
Change History (3)
comment:1 Changed 11 years ago by
Component: | unfiled → selector |
---|---|
Priority: | undecided → low |
Status: | new → open |
Summary: | is(':enabled') and is(':disabled') are not complementary in IE7 → hidden inputs are not :enabled in IE6/7 |
comment:2 Changed 11 years ago by
Lots of ancient history here.
https://github.com/jquery/sizzle/commit/93e33dc2a41e2b0aa0e1e1c66368f5d224da80e1
As of that commit in 2008, a disabled/enabled element must have a property that is a boolean value, so that :enabled
checks elem.disabled===false
and won't say an arbitrary element is enabled. The check for type !== "hidden"
predates the Github repo and seems to be the real issue here.
Logically it does seem like these should be complements of each other, but it's been broken this way for a LONG time.
comment:3 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Simplified test case: http://jsfiddle.net/timmywil/3fvJ7/6/