Opened 13 years ago

Closed 13 years ago

#1862 closed defect (wontfix)

'checked' and 'disabled' attributes no longer work in custom widgets

Reported by: gsmedley@… Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.4
Keywords: Cc:
Blocked By: Blocking:

Description

One of the code changes for #1586 was to add special handling of 'checked' and 'disabled' attributes in dojo.widget.Parse.parseProperties. This has implications for all widgets, including a custom widget of my own that has a checked attribute. With this changed the checked property is always 'true' no matter what I set it to in the html. Perhaps there is a better way to address the original bug that does not disrupt these attribute names for all widgets.

Change History (3)

comment:1 Changed 13 years ago by bill

According to the HTML spec (see http://www.w3.org/TR/html4/interact/forms.html#h-17.12), that's how "disabled" is supposed to work, at least for BUTTON, INPUT, OPTGROUP, OPTION, SELECT, and TEXTAREA nodes. In other words, doing something like <input disabled> or <button disabled="foo"> or even <select disabled="false"> will disable the respective nodes.

For "checked" (see http://www.w3.org/TR/html4/interact/forms.html#adef-checked), that's the way it's supposed to work for INPUT nodes.

So, the question was whether we should have this behavior for all nodes, or just for BUTTON, INPUT, OPTGROUP, OPTION, SELECT, and TEXTAREA nodes. It seemed more consistent to do it for all nodes.

comment:2 Changed 13 years ago by gsmedley@…

OK, I'm convinced. I'll make my widget use the well-known behavior of the checked attribute. Thanks for the quick response.

comment:3 Changed 13 years ago by bill

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.