[whatwg] Two propositions for the autofocus attribute

Garrett Smith dhtmlkitchen at gmail.com
Sun Apr 25 16:14:17 PDT 2010

On Thu, Apr 15, 2010 at 10:52 PM, timeless <timeless at gmail.com> wrote:
> fwiw, w/ the mobile browsers i work w/, random focus changes are
> incredibly annoying.
> we had a "manager" who insisted on a "feature" where the browser would
> move focus to the urlbar in certain cases.

Why is the manager making decisions about U/X? Does he believe he is
qualified to do that? Unless somebody properly tells him otherwise, he
may likely go on believing that.

> as a result users often have text they're typing spread across at
> least two input areas.

Is it username and password? GMail does that, changing focus around on
me and it is annoying when I get the error message telling me that I
typed the wrong password when I didn't; gmail just changed focus
around on me and that caused a problem.

> needless to say, our users/engineers are not amused.

Did you demonstrate the problems? There is a chance that he is totally
ignorant to the consequences of doing that. Maybe his typing is also
slow or maybe he doesn't use the feature repeatedly/

> also note that dom insertion is somewhat random, so:
>   <form>
>     <input id=c1 autofocus>
>   </form>
>   <form>
>     <input id=c2 autofocus>
>   </form>
> could either focus c1, or it could focus c2, depending on random-ish
> things like packet size.

Sure, and that code would surely e a mistake; perhaps using two
separate include files. The developer adding the second might wonder:
Why does c2 not get focus? He would find his mistake, eventually
(hopefully soon!) and fix it.

More information about the whatwg mailing list