W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2011

[whatwg] Autofocus readonly Input Elements

From: Kaustubh Atrawalkar <kaustubh@motorola.com>
Date: Sun, 25 Sep 2011 11:47:13 +0530
Message-ID: <CANw-Mg9HaKKehNemsuZYtv6Z9dYZm=UQZeb+83EtZuq_V0pUkg@mail.gmail.com>
On Sat, Sep 24, 2011 at 9:38 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:

> On Fri, Sep 23, 2011 at 1:27 PM, Ojan Vafai <ojan at chromium.org> wrote:
>
>> On Fri, Sep 23, 2011 at 11:49 AM, Ian Hickson <ian at hixie.ch> wrote:
>> > > There are no as such concrete use cases though, one use case can be if
>> > > user want to get the element in focus (may be by scrolling the page on
>> > > load). Currently, Firefox & Opera does focus the readonly elements on
>> > > autofocus whereas IE & Webkit does not. Need to clear the ambiguity.
>> >
>> > If they're focusable at all, I don't see why they wouldn't be
>> > autofocusable. Is there a use case for special-casing read-only ones?
>> >
>>
>> Right. The question is whether read-only/disabled/hidden inputs should be
>> focusable.
>>
>
> Readonly elements are focusable both in IE and WebKit.
>

Agree, then they can be autofocus-able as well as per algorithm.

>
>
>> I don't personally see pros and cons in either direction, but I
>> wanted to make sure there was agreement here before changing WebKit's
>> behavior.
>>
>
> The question is whether or not there's any backward compatibility issue
> given the market share of IE and WebKit today.
>
> Unless user gives a readonly element autofocus attribute this wont be
triggered. And when user explicitly add autofocus he expects it to be
focused. But still, the question remains with which behavior we should
comply.
Received on Saturday, 24 September 2011 23:17:13 UTC

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