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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>22202</bug_id>
          
          <creation_ts>2008-11-12 02:42:24 -0800</creation_ts>
          <short_desc>Would like “disabled” attribute to work on non-form elements</short_desc>
          <delta_ts>2012-03-11 23:24:35 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Johan Lund">jl</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>antaryami.pandia</cc>
    
    <cc>ap</cc>
    
    <cc>darin</cc>
    
    <cc>eric</cc>
    
    <cc>jl</cc>
    
    <cc>mounir</cc>
    
    <cc>ojan</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>98458</commentid>
    <comment_count>0</comment_count>
    <who name="Johan Lund">jl</who>
    <bug_when>2008-11-12 02:42:24 -0800</bug_when>
    <thetext>I have 2 divs with tabIndex=1 and one of them is disabled.
If I tab to the disabled element it displays a focus outline.
This is not the case in e.g. Firefox.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98459</commentid>
    <comment_count>1</comment_count>
      <attachid>25093</attachid>
    <who name="Johan Lund">jl</who>
    <bug_when>2008-11-12 02:46:07 -0800</bug_when>
    <thetext>Created attachment 25093
Simple html illustrating outline shown on disabled elements</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>555136</commentid>
    <comment_count>2</comment_count>
    <who name="Antaryami Pandia (apandia)">antaryami.pandia</who>
    <bug_when>2012-02-13 02:45:00 -0800</bug_when>
    <thetext>Adding some webkit reviewers.

The main issues is that webkit focuses element, even if its disabled. I modified the attached test case to verify it:-

&lt;html&gt;&lt;head&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function setStyle() {
document.getElementById(&quot;div1&quot;).style.background=&quot;yellow&quot;; }

function setStyle1() {
document.getElementById(&quot;div2&quot;).style.background=&quot;red&quot;; }
&lt;/script&gt;&lt;/head&gt;

&lt;body&gt;
&lt;div id=&quot;div1&quot; tabIndex=&quot;1&quot; onfocus=&quot;setStyle()&quot;&gt;123456&lt;/div &gt;
&lt;div id=&quot;div2&quot; tabIndex=&quot;1&quot; disabled=&quot;true&quot; onfocus=&quot;setStyle1()&quot;&gt;abcdefg&lt;/div &gt;
&lt;/body&gt;&lt;/html&gt;

Currently the disabled attribute is supported only for form control elements. It seems firefox supports &quot;disabled&quot; attributes for all html tags.

1. Is the current webkit behavior is inteded one?
2. Should we support &quot;disabled&quot; attribute for elements other than form controls?

Please provide feedback.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>558031</commentid>
    <comment_count>3</comment_count>
    <who name="Antaryami Pandia (apandia)">antaryami.pandia</who>
    <bug_when>2012-02-16 02:53:42 -0800</bug_when>
    <thetext>Please provide some feedback.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>558196</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-02-16 08:06:42 -0800</bug_when>
    <thetext>http://www.whatwg.org/specs/web-apps/current-work/#attr-fe-disabled

disabled only appears to affect form elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>558271</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2012-02-16 09:34:17 -0800</bug_when>
    <thetext>If disabling is applied to other types of elements by Firefox, then that’s an extension, not something from the current HTML standards. If we think that’s a desirable feature I suggest we bring it with other folks working on the HTML standard at W3C.

I don’t think this is a feature that’s so compelling that we’d want to do it without first discussing it with the others.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>558906</commentid>
    <comment_count>6</comment_count>
    <who name="Antaryami Pandia (apandia)">antaryami.pandia</who>
    <bug_when>2012-02-16 21:55:51 -0800</bug_when>
    <thetext>Thanks Eric, Darin for the feedback.

I was of the same opinion, since disabled attribute affects only form control elements.

Actually the issue was logged as an outline issue, but I found that the issue is with disabled attribute being used with a non-form control element (darin has also updated the title of the issue). Thats the precise reason I asked the feedback of yours, as its not according to spec and also a feature which may not be of that much interest to a web developer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>558933</commentid>
    <comment_count>7</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2012-02-16 22:42:51 -0800</bug_when>
    <thetext>Also, can we instead talk with Mozilla folks and see they can drop &quot;disabled&quot; content attribute support on non-from-control elements?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>558942</commentid>
    <comment_count>8</comment_count>
    <who name="Antaryami Pandia (apandia)">antaryami.pandia</who>
    <bug_when>2012-02-16 22:59:20 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; Also, can we instead talk with Mozilla folks and see they can drop &quot;disabled&quot; content attribute support on non-from-control elements?

So should I log a bug at Mozilla bugzilla or talk on Mozilla dev channel.What would you recommend.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>558944</commentid>
    <comment_count>9</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2012-02-16 23:04:29 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #7)
&gt; &gt; Also, can we instead talk with Mozilla folks and see they can drop &quot;disabled&quot; content attribute support on non-from-control elements?
&gt; 
&gt; So should I log a bug at Mozilla bugzilla or talk on Mozilla dev channel.What would you recommend.

Asking on #developer might work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>562840</commentid>
    <comment_count>10</comment_count>
    <who name="Antaryami Pandia (apandia)">antaryami.pandia</who>
    <bug_when>2012-02-22 22:28:31 -0800</bug_when>
    <thetext>I had sent a mail to mozila dev forum and as suggested logged a bug in firefox.

https://bugzilla.mozilla.org/show_bug.cgi?id=729845

Also I think we can close this issue as this is the expected behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>573820</commentid>
    <comment_count>11</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2012-03-08 07:35:35 -0800</bug_when>
    <thetext>(In reply to comment #0)
&gt; I have 2 divs with tabIndex=1 and one of them is disabled.
&gt; If I tab to the disabled element it displays a focus outline.
&gt; This is not the case in e.g. Firefox.

This is a bug in Gecko/Firefox and we going to fix that. I guess this bug could be marked as WONTFIX.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>575945</commentid>
    <comment_count>12</comment_count>
    <who name="Antaryami Pandia (apandia)">antaryami.pandia</who>
    <bug_when>2012-03-11 22:49:19 -0700</bug_when>
    <thetext>It seems I can&apos;t close this issue.
Request someone with the privilege to close the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>575962</commentid>
    <comment_count>13</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2012-03-11 23:24:13 -0700</bug_when>
    <thetext>Gecko no longer supports disabled attribute on non-form control elements. Closing the bug as wontfix.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>25093</attachid>
            <date>2008-11-12 02:46:07 -0800</date>
            <delta_ts>2008-11-12 02:46:07 -0800</delta_ts>
            <desc>Simple html illustrating outline shown on disabled elements</desc>
            <filename>outline_bug.html</filename>
            <type>text/html</type>
            <size>110</size>
            <attacher name="Johan Lund">jl</attacher>
            
              <data encoding="base64">PGh0bWw+Cjxib2R5Pgo8ZGl2IHRhYkluZGV4PSIxIj4xMjM0NTY8L2RpdiA+CjxkaXYgdGFiSW5k
ZXg9IjEiIGRpc2FibGVkPSJ0cnVlIj5hYmNkZWZnPC9kaXYgPgo8L2JvZHk+CjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>