Ticket #12295 (closed bug: worksforme)
It`s not closed : "live" / "delegate" bug about ":enabled" filter
| Reported by: | alix | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | None |
| Component: | selector | Version: | 1.8.0 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
With regard to jQuery Documentation(:enabled) on http://api.jquery.com/enabled-selector/ describing : ".... In other words, the bare $(':enabled') is equivalent to $('*:enabled'), so $('input:enabled') should be used instead. .... "
But in fact the subject is different. Let's take a look:
http://jsfiddle.net/RJ8tb/
AND
I had made similar Ticket previously http://bugs.jquery.com/ticket/12288 but someone closed it. Hey jQuery! can you please and let users to have more time to complete the ticket (for example posting fiddle code)
I think with this harassingly hard bug mechanism of jQuery, people will be satisfied to report no more bugs
Change History
comment:3 Changed 9 months ago by alix
Changed 64 minutes ago by dmethvin
Status changed from pending to closed
Resolution set to invalid
$('[rel*="Async"]:not(:text, :password, select, textarea):not([rel*="NotAsync"])').not('[disabled]').live('click', fun...
The .live method cannot be used in a chain like that, see the documentation. Also, .live is deprecated.
OK there is no problem with .live because the actual bug is from :enabled selector returning different result against :not(:disabled) and the bug is same with live and delegate.
As described in documentation : ":enabled" should be same as "*:enabled" NOT "input:enabled". This problem makes extremely hidden bugs in the programmer's code. Please check the fiddle code :
http://jsfiddle.net/RJ8tb/
comment:4 Changed 9 months ago by dmethvin
- Keywords needsdocs added
- Priority changed from undecided to low
- Status changed from new to closed
- Component changed from unfiled to selector
- Resolution set to worksforme
These are different things. "[disabled]" means it has a disabled attribute, regardless of the attribute's value. :enabled and :disabled are jQuery extensions, implemented this way:
"enabled": function( elem ) {
return elem.disabled === false;
},
"disabled": function( elem ) {
return elem.disabled === true;
},
The value of the .disabled property can have other values, such as undefined, that would mean it is neither enabled nor disabled. It usually doesn't make sense to ask about the enabled/disabled state of elements that don't have an intrinsic notion of that--mostly input elements.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

I mean : "harassingly hard bug report mechanism"