Re: [whatwg] Markup-related feedback

Here's a code example to illustrate the confounding problem of a
disabled INPUT whose disabled property is false.

http://jsfiddle.net/cmsom6jo/2/

<form action="">
<fieldset id="a">
    <table><tr><td><input name="b" id="b"/></table>
</fieldset>
</form>
<script>
// Disable the fieldset to make all its form control
// descendants to be disabled
    document.getElementById("a").disabled = true;

// Are they? Lets see:
    alert(document.getElementById("b").disabled);
</script>


 - alerts false

This result, in a way, seems to contradict the following:-

| The disabled attribute, when specified, causes all
| the form control descendants of the fieldset element,
| excluding those that are descendants of the fieldset
| element's first legend element child, if any, to be disabled.

http://www.w3.org/TR/html5/forms.html#the-fieldset-element


On 12/29/14, Garrett Smith <dhtmlkitchen@gmail.com> wrote:
> On 12/29/14, Garrett Smith <dhtmlkitchen@gmail.com> wrote:
>> On 10/27/14, Ian Hickson <ian@hixie.ch> wrote:
>>>
>>> On Fri, 24 Jan 2014, Jukka K. Korpela wrote:
>>>> 2014-01-22 2:28, Ian Hickson wrote:
>>>> > On Tue, 3 Dec 2013, Jukka K. Korpela wrote:
>>>> > >
>>
>
> [...]
>
>> - but now that FIELDSET can be disabled, descendent elements are
>> ineligible for success, yet `element.disabled` is true. A confounding
>> yet glaring detail.
>
>
> Let me try that again. ...
>
> - now that FIELDSET can be disabled, and when it is disabled,
> its descendent form control elements are ineligible for success,
> even their `disabled` property is false. A confounding yet glaring detail.
> --
> Garrett
> @xkit
> ChordCycles.com
> garretts.github.io
>


-- 
Garrett
@xkit
ChordCycles.com
garretts.github.io

Received on Tuesday, 30 December 2014 06:43:17 UTC