W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

[whatwg] Can we make checkboxes readonly?

From: Charles Pritchard <chuck@jumis.com>
Date: Fri, 4 May 2012 23:19:19 -0700
Message-ID: <8CA7CD77-C3F5-4986-9744-6C9D2ADEDA61@jumis.com>
On May 4, 2012, at 9:05 PM, "Tab Atkins Jr." <jackalmage at gmail.com> wrote:

> On Wed, May 2, 2012 at 3:57 PM, Ian Hickson <ian at hixie.ch> wrote:
>> On Wed, 6 Apr 2011, Tab Atkins Jr. wrote:
>>> An app may dynamically set inputs or groups of inputs to readonly based
>>> on app state.  When you submit, though, it's impossible to tell (without
>>> hacks) whether a checkbox was checked-but-disabled or just unchecked.
>>> Handling the form data is *much* easier if you just get all the data,
>>> regardless of whether, as a UI convenience, your app temporarily set
>>> some of the inputs to readonly.
>> That's a use case for submitting disabled check boxes, not for read-only
>> checkboxes, IMHO. (The same could be said for disabled text controls.)
> That's more-or-less what @readonly does - the input becomes "disabled"
> but still submits.
> ~TJ

Afaik, the issue with disabled is selection.

There are some long term issues with selection; between CSS content and vendor prefixes (text-selection), this issue ought to be considered.
Received on Friday, 4 May 2012 23:19:19 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:41 UTC