Skip to main content

Bug Tracker

Side navigation

#6591 closed bug (duplicate)

Opened May 21, 2010 03:22AM UTC

Closed November 09, 2010 07:55AM UTC

Last modified November 09, 2010 07:55AM UTC

":enabled" pseudo-selector is wrong

Reported by: diyism Owned by:
Priority: undecided Milestone: 1.4.3
Component: selector Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:
Description

alert($("[name=CreativeID[]]").length);get 6

alert($("[name=CreativeID[]]:disabled").length);get 2

alert($("[name=CreativeID[]]:enabled").length);//get 0

it should get 4

Attachments (0)
Change History (5)

Changed May 21, 2010 03:29AM UTC by diyism comment:1

alert($("[name=CreativeID[]]:not(:disabled)").length); // get 4

Changed May 21, 2010 03:36AM UTC by diyism comment:2

In my mind, it should be take as "enabled", because its value will be send to the server:

<input type="hidden" value="1" name="CreativeID[]">

Changed May 21, 2010 03:43AM UTC by diyism comment:3

For reference, from the HTML 4 spec:

"DISABLED attribute, also new in HTML 4.0, disables the control.

Disabled elements are read-only elements with the added restrictions

that the values are not submitted with the form, the elements cannot

receive focus, and the elements are skipped when navigating the

document by tabbing."

Perhaps the most intuitive behavior would be if the ":enabled",

":disabled" selectors selected elements directly corresponding to

whether the disabled attribute is set, and nothing more.

quoted from:

http://old.nabble.com/Selector-:enabled-no-longer-finds-hidden-elements-td21734256s27240.html

Changed November 09, 2010 07:55AM UTC by snover comment:4

priority: → undecided
resolution: → duplicate
status: newclosed
summary: ":enabled" is not working correctly":enabled" pseudo-selector is wrong

Workaround: Use

Changed November 09, 2010 07:55AM UTC by snover comment:5

Duplicate of #4013.