Closed Bug 729845 Opened 12 years ago Closed 12 years ago

"disabled" attribute should not work on non-form elements

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: antaryami.pandia, Assigned: mounir)

Details

Attachments

(2 files, 1 obsolete file)

Attached file test-page.html
User Agent: Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
Build ID: 20111228084953

Steps to reproduce:

The attached page contains 2 divs with tabIndex=1 and one of them is disabled.



Actual results:

If I tab to the disabled element outline is not drawn which means "disabled" attribute is working for non-form control elements.



Expected results:

"disabled" should not work for non-form control elements.
Please also refer webkit bugs:- https://bugs.webkit.org/show_bug.cgi?id=22202
Date: Wed, 22 Feb 2012 10:08:27 -0500
From: Boris Zbarsky <bzbarsky@mit.edu>

...

Looks like just a bug to me.  Please file in the Core product?

-Boris
Component: Untriaged → General
Product: Firefox → Core
QA Contact: untriaged → general
Mounir, shouldn't IsDisabled() on nsGenericHTMLElement just return false?
Component: General → DOM
QA Contact: general → general
Attached patch Patch v1 (obsolete) — Splinter Review
Indeed, with bug 557087, I did introduce |IsDisabled()| but it seems that this bug didn't cause the regression:
https://hg.mozilla.org/mozilla-central/rev/b15d9c989201#l1.157

So I guess the described issue must be quit old.

Here is a patch that might fix it. I will write some tests as soon as I will have a try run done.
Assignee: nobody → mounir
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #603999 - Flags: review?(bzbarsky)
OS: Linux → All
Hardware: x86 → All
Whiteboard: [needs review]
Version: 9 Branch → Trunk
Attached patch Patch with testsSplinter Review
I think this pass should pass our test suite.
It's lovely to see that we had tests checking that <div tabindex=1 disabled> was actually not focusable... :)
Attachment #603999 - Attachment is obsolete: true
Attachment #604033 - Flags: review?(bzbarsky)
Attachment #603999 - Flags: review?(bzbarsky)
Whiteboard: [needs review] → [needs review][passes try]
Comment on attachment 604033 [details] [diff] [review]
Patch with tests

r=me
Attachment #604033 - Flags: review?(bzbarsky) → review+
Flags: in-testsuite+
Whiteboard: [needs review][passes try]
Target Milestone: --- → mozilla13
Attachment #604033 - Flags: checkin+
Antaryami, thank you for reporting that issue. That was a very valuable feedback!
That bug should be fixed in Firefox 13. The fix will be available soon in our Nightly builds.
https://hg.mozilla.org/mozilla-central/rev/ad71757b3229
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: