Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery 3.1.0 gets option:disabled and option:enabled wrong #3224

Closed
acdcjunior opened this issue Jul 11, 2016 · 5 comments
Closed

jQuery 3.1.0 gets option:disabled and option:enabled wrong #3224

acdcjunior opened this issue Jul 11, 2016 · 5 comments
Assignees
Milestone

Comments

@acdcjunior
Copy link

@acdcjunior acdcjunior commented Jul 11, 2016

Description

Considering the spec (https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled), 2.2.4 is correct.

  • What do you expect to happen?
  • Native, 2.2.4 and 3.1.0 bring the same number of elements.
  • What acually happens?
  • 3.1.0 brings a different number.
  • Which browsers are affected?
  • Tested on Chrome 51@windows10 only.

Link to test case

http://plnkr.co/edit/SaKHF3YxEQ9CcnH8Ri4z?p=preview

@gibson042
Copy link

@gibson042 gibson042 commented Jul 11, 2016

Confirmed; looks like jquery/sizzle@7999a01 just flat-out got optgroup handling wrong.

@timmywil
Copy link

@timmywil timmywil commented Jul 11, 2016

Was looking at this too, and I noticed that Chrome sees <a disabled></a> as still enabled, which caused the new feature test to fail. That said, I think Chrome's right, since the anchor element does not have a disabled IDL.

@timmywil
Copy link

@timmywil timmywil commented Jul 11, 2016

BTW http://jsbin.com/texafetaro/edit?html,js,console,output

Different results in Safari and FF than Chrome.

@gibson042
Copy link

@gibson042 gibson042 commented Jul 11, 2016

Chrome sees <a disabled></a> as still enabled, which caused the new feature test to fail. That said, I think Chrome's right, since the anchor element does not have a disabled IDL.

Chrome is actually the reason for that content; <a> elements should never match ":enabled".

@timmywil
Copy link

@timmywil timmywil commented Jul 11, 2016

I see, so it shouldn't match either ':enabled' or ':disabled'.

@timmywil timmywil added this to the 3.1.1 milestone Jul 11, 2016
@timmywil timmywil added this to the 3.1.1 milestone Jul 11, 2016
@gibson042 gibson042 self-assigned this Jul 18, 2016
gibson042 added a commit to gibson042/sizzle that referenced this issue Jul 30, 2016
gibson042 added a commit to jquery/sizzle that referenced this issue Aug 8, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants