<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>18628</bug_id>
          
          <creation_ts>2012-08-20 20:21:19 +0000</creation_ts>
          <short_desc>:enabled pseudo-class is implemented uniformly, but differs from the spec</short_desc>
          <delta_ts>2012-08-30 18:23:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Micah Snyder">micah.snyder</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72447</commentid>
    <comment_count>0</comment_count>
    <who name="Micah Snyder">micah.snyder</who>
    <bug_when>2012-08-20 20:21:19 +0000</bug_when>
    <thetext>In the WHATWG spec for :enabled it specifies &quot;input elements whose type attribute are not in the Hidden state and that are not disabled&quot;. Ref: http://www.whatwg.org/specs/web-apps/current-work/multipage/selectors.html#selector-enabled

However, the querySelectorAll implementation for every major browser I&apos;ve tested (OSX 10.7.4 - Safari 6, Chrome 21, Firefox 12. Win8 - IE9, IE10) ignores the hidden state of the element. Test case here: http://jsfiddle.net/duHdp/1/

This seems like kind of a weird one. The spec says one thing, which makes sense, but it&apos;s uniformly implemented across browsers in a way that doesn&apos;t conform to the new spec (Aside: The original W3C Selectors spec makes no mention of hidden attributes, which I think is how this implementation difference came about).

To make things even more interesting, many CSS selector engines written in JS (like Sizzle) implement the WHATWG version, so if you&apos;re using jQuery in a browser that supports qSA you&apos;ll get a different result set than if you ran the exact same selector in a browser that doesn&apos;t support qSA.

I don&apos;t know the right answer here -- whether browsers should change to conform to WHATWG or the spec and the JS implementations should change to conform to browser behavior -- but I figured it&apos;s a bug and should be raised.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73079</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-08-30 18:23:29 +0000</bug_when>
    <thetext>Thanks for bringing it up. It was also brought up in the WHATWG mailing list, where I resolved it by changing the spec to match browsers.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>