Site Navigation

Tuesday, August 28, 2012

Bug or Feature - Round Six

Round Six Enabling the non-Disabled.

Other rounds: [One|Two|Three|Four|Five|Six]

We're back again with another round of "Bug or Feature?" highlighting a particular behavior in one or more browsers, that, well, could be a Bug, or it could be a Feature... we'll open up the comments for your vote and opinion.

Alright, what's today's "Bug or Feature"?

Everyone knows that form elements [button|input|select|textarea] can be disabled to stop users interacting with them and to ensure they are not "successful controls" when a form is submitted.

So... what happens if you disable non form elements?

In most browsers... Just like you'd expect... absolutely nothing because it isn't supported.

However in IE there is a different behavior.

In IE when you set the disabled flag on an element it "kinda-sorta" disables all the child elements.

<div disabled="disabled">
  <input type="text" name="foo" value="bar"/><br/>
  Send me spam:
  <input type="checkbox" name="baz" value="yes" checked="checked"/><br/>

So is it expected that the child elements render disabled? What if you wanted one or more of the children enabled?

Known Workarounds: None.

Related Issues: None.

Bug/Site Feedback |
Submit a bug

1 comment:

David said...

I'd argue a 'feature' when used on a form element, and a bug on anything else. I could totally see the use of disabling an entire form, and to do that through a single attribute would not only be convenient, but more importantly would make sense semantically.

As a side note, the psudo-disable you mention is interesting. You can edit text, but not click form elements. Buggy behavior, but I could understand the benefit.