RESOLVED INVALID 23145
retain focus after unintentional onblur to allow directional pad navigation
https://bugs.webkit.org/show_bug.cgi?id=23145
Summary retain focus after unintentional onblur to allow directional pad navigation
Cary Clark
Reported 2009-01-06 12:46:51 PST
Android uses a directional pad to move focus spatially, and interprets the directional pad center button as a mouse click on the center of the current focus. http://tools.arantius.com/stopwatch includes this: <div id='main'> <button type='button' onclick='ss()' onfocus='this.blur()'>Start / Stop</button> <input type='text' id='disp' /> <button type='button' onclick='r()' onfocus='this.blur()'>Reset</button> </div> So, when using a directional keypad to gain focus on the Start or Reset button, the onfocus attribute removes the focus. This patch ignores the part of blur which clears the document focus if the element does not have an onBlur attribute. I'm not particularly proud of this fix, but don't have an alternative. What can I do to improve on this patch?
Attachments
ignore onBlur() clearing focus for directional pad navigation (2.20 KB, patch)
2009-01-06 12:54 PST, Cary Clark
adele: review-
Cary Clark
Comment 1 2009-01-06 12:54:47 PST
Created attachment 26468 [details] ignore onBlur() clearing focus for directional pad navigation
Adele Peterson
Comment 2 2009-03-23 11:38:21 PDT
Comment on attachment 26468 [details] ignore onBlur() clearing focus for directional pad navigation I don't think its wise to ignore blur in this case. This seems more like a site bug to me. In Safari, the site won't let you tab to focus those buttons either, so there would be no way to activate the button without a mouse. I guess the real problem here is that there's no way to tell that this is really an unintentional blur. If it is unintentional, the site should fix it.
Cary Clark
Comment 3 2010-01-28 08:31:33 PST
Android no longer moves the focus with the direction pad so this is obsolete.
Note You need to log in before you can comment on or make changes to this bug.