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

[whatwg] Autofocus readonly Input Elements

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 23 Sep 2011 18:49:04 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1109231848150.16440@ps20323.dreamhostps.com>
On Fri, 23 Sep 2011, Kaustubh Atrawalkar wrote:
> Reference -
> http://www.whatwg.org/specs/web-apps/current-work/#attr-fe-autofocus
> Here there is mentioned that ""Queue a task that checks to see if the
> element is focusable, and if so, runs the focusing steps for that element.
> User agents may also change the scrolling position of the document, or
> perform some other action that brings the element to the user's attention."
> As per this statement, every focus-able element should be autofocus-able.
> Does this applies to readonly input elements as well?

Since it doesn't say otherwise, yes.

> 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?

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 23 September 2011 11:49:04 UTC

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