<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>23145</bug_id>
          
          <creation_ts>2009-01-06 12:46:51 -0800</creation_ts>
          <short_desc>retain focus after unintentional onblur to allow directional pad navigation</short_desc>
          <delta_ts>2010-01-28 08:31:33 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>23163</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Cary Clark">caryclark</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>tonikitoo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>104607</commentid>
    <comment_count>0</comment_count>
    <who name="Cary Clark">caryclark</who>
    <bug_when>2009-01-06 12:46:51 -0800</bug_when>
    <thetext>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:
&lt;div id=&apos;main&apos;&gt;
	&lt;button type=&apos;button&apos; onclick=&apos;ss()&apos; onfocus=&apos;this.blur()&apos;&gt;Start / Stop&lt;/button&gt;
	&lt;input type=&apos;text&apos; id=&apos;disp&apos; /&gt;
	&lt;button type=&apos;button&apos; onclick=&apos;r()&apos; onfocus=&apos;this.blur()&apos;&gt;Reset&lt;/button&gt;
&lt;/div&gt;
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&apos;m not particularly proud of this fix, but don&apos;t have an alternative. What can I do to improve on this patch?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104608</commentid>
    <comment_count>1</comment_count>
      <attachid>26468</attachid>
    <who name="Cary Clark">caryclark</who>
    <bug_when>2009-01-06 12:54:47 -0800</bug_when>
    <thetext>Created attachment 26468
ignore onBlur() clearing focus for directional pad navigation</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114807</commentid>
    <comment_count>2</comment_count>
      <attachid>26468</attachid>
    <who name="Adele Peterson">adele</who>
    <bug_when>2009-03-23 11:38:21 -0700</bug_when>
    <thetext>Comment on attachment 26468
ignore onBlur() clearing focus for directional pad navigation

I don&apos;t think its wise to ignore blur in this case.  This seems more like a site bug to me.  In Safari, the site won&apos;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&apos;s no way to tell that this is really an unintentional blur.  If it is unintentional, the site should fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185495</commentid>
    <comment_count>3</comment_count>
    <who name="Cary Clark">caryclark</who>
    <bug_when>2010-01-28 08:31:33 -0800</bug_when>
    <thetext>Android no longer moves the focus with the direction pad so this is obsolete.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>26468</attachid>
            <date>2009-01-06 12:54:47 -0800</date>
            <delta_ts>2009-03-23 11:38:21 -0700</delta_ts>
            <desc>ignore onBlur() clearing focus for directional pad navigation</desc>
            <filename>patchForBug23145.txt</filename>
            <type>text/plain</type>
            <size>2249</size>
            <attacher name="Cary Clark">caryclark</attacher>
            
              <data encoding="base64">SW5kZXg6IEphdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT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CdWlsZCBmaXggb25seSwgbm8gcmV2aWV3LgpJbmRl
eDogV2ViQ29yZS9kb20vRWxlbWVudC5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gV2ViQ29yZS9kb20vRWxl
bWVudC5jcHAJKHJldmlzaW9uIDM5NjYwKQorKysgV2ViQ29yZS9kb20vRWxlbWVudC5jcHAJKHdv
cmtpbmcgY29weSkKQEAgLTExMTAsNiArMTExMCwxMCBAQCB2b2lkIEVsZW1lbnQ6OnVwZGF0ZUZv
Y3VzQXBwZWFyYW5jZShib29sCiB2b2lkIEVsZW1lbnQ6OmJsdXIoKQogewogICAgIGNhbmNlbEZv
Y3VzQXBwZWFyYW5jZVVwZGF0ZSgpOworI2lmIEVOQUJMRShESVJFQ1RJT05BTF9QQURfTkFWSUdB
VElPTikKKyAgICBpZiAoIWF0dHJpYnV0ZXMoKS0+Z2V0TmFtZWRJdGVtKEhUTUxOYW1lczo6b25i
bHVyQXR0cikuZ2V0KCkpCisgICAgICAgIHJldHVybjsKKyNlbmRpZgogICAgIERvY3VtZW50KiBk
b2MgPSBkb2N1bWVudCgpOwogICAgIGlmIChkb2MtPmZvY3VzZWROb2RlKCkgPT0gdGhpcykgewog
ICAgICAgICBpZiAoZG9jLT5mcmFtZSgpKQo=
</data>
<flag name="review"
          id="12556"
          type_id="1"
          status="-"
          setter="adele"
    />
          </attachment>
      

    </bug>

</bugzilla>