<?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>13020</bug_id>
          
          <creation_ts>2007-03-08 23:06:46 -0800</creation_ts>
          <short_desc>REGRESSION: Returning false from onkeypress event on Input is ignored when key is Tab</short_desc>
          <delta_ts>2008-01-21 04:47:22 -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>WebCore Misc.</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://enfinitystudios.thaposse.net/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Elliott Sprehn">esprehn</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>adele</cc>
    
    <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>19821</commentid>
    <comment_count>0</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2007-03-08 23:06:46 -0800</bug_when>
    <thetext>An onkeypress event handler for an input element which returns false to abort the key press will be ignored when the key that was pressed was Tab. The return value of false is obeyed when the key is not the Tab key.

However, If the onkeydown event is used instead the return value of false will be obeyed for Tab.

This new behavior is consistent with IE, however it is inconsistent with Gecko and previous versions of Safari.

Reproducible in latest nightly: (Fri Mar 9 6:30:40 GMT 2007)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19792</commentid>
    <comment_count>1</comment_count>
      <attachid>13554</attachid>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2007-03-08 23:18:45 -0800</bug_when>
    <thetext>Created attachment 13554
Test Case

In this test case pressing tab in both inputs should do nothing as per previous Safari behavior. However in the input where the event handler was attached with onkeypress the return value of false is ignored and the focus jumps off the input to the Back button in the browser.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19793</commentid>
    <comment_count>2</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2007-03-08 23:20:40 -0800</bug_when>
    <thetext>It should also be noted that Gecko allows aborting Tab key presses with onkeypress, but *not* with onkeydown, which is the exact opposite of this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19764</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-03-09 09:20:36 -0800</bug_when>
    <thetext>Confirmed as a regression with r20057.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19003</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-03-13 16:22:00 -0700</bug_when>
    <thetext>&lt;rdar://problem/5061024&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17582</commentid>
    <comment_count>5</comment_count>
    <who name="Adele Peterson">adele</who>
    <bug_when>2007-03-23 14:25:51 -0700</bug_when>
    <thetext>Committed revision 20453.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67839</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-01-21 04:47:22 -0800</bug_when>
    <thetext>We no longer dispatch keypress event for tab, arrow keys etc., so this fix has been effectively undone.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>13554</attachid>
            <date>2007-03-08 23:18:45 -0800</date>
            <delta_ts>2007-03-08 23:18:45 -0800</delta_ts>
            <desc>Test Case</desc>
            <filename>keypress-error.html</filename>
            <type>text/html</type>
            <size>884</size>
            <attacher name="Elliott Sprehn">esprehn</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIgogICAgICAg
ICJodHRwOi8vd3d3LnczLm9yZy9UUi9odG1sNC9zdHJpY3QuZHRkIj4KCjxodG1sPgoKPGhlYWQ+
Cgk8dGl0bGU+QWJvcnQgVGFiIFByZXNzPC90aXRsZT4KCTxtZXRhIGh0dHAtZXF1aXY9ImNvbnRl
bnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04Ij4KCQoJPHN0eWxlIHR5
cGU9InRleHQvY3NzIj4KCTwvc3R5bGU+CgkKCTxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2NyaXB0
Ij4KCQlrZXloYW5kbGVyID0gZnVuY3Rpb24oZSkgewoJCQl2YXIgZWwgPSBlLnRhcmdldDsKCQkJ
dmFyIGtjID0gZS5rZXlDb2RlP2Uua2V5Q29kZTplLndoaWNoOwoJCQkKCQkJLy8gdHJhcCB0YWJz
CgkJCWlmKCBrYyA9PSA5ICkgewoJCQkJcmV0dXJuIGZhbHNlOwoJCQl9CgkJCQoJCQlyZXR1cm4g
dHJ1ZTsKCQl9CQoJCgkJd2luZG93Lm9ubG9hZCA9IGZ1bmN0aW9uKCkgewoJCQlkb2N1bWVudC5n
ZXRFbGVtZW50QnlJZCgib25rZXlwcmVzcyIpLm9ua2V5cHJlc3MgPSBrZXloYW5kbGVyOwoJCQlk
b2N1bWVudC5nZXRFbGVtZW50QnlJZCgib25rZXlkb3duIikub25rZXlkb3duID0ga2V5aGFuZGxl
cjsJCQkKCQl9Cgk8L3NjcmlwdD4KCQo8L2hlYWQ+Cjxib2R5PgoJPGZvcm0gYWN0aW9uPSIiPgoJ
CTxkaXY+CgkJCTxsYWJlbD5XaXRoIG9ua2V5cHJlc3M8aW5wdXQgdHlwZT0idGV4dCIgaWQ9Im9u
a2V5cHJlc3MiIG5hbWU9InRlc3QiPjwvbGFiZWw+CgkJCTxsYWJlbD5XaXRoIG9ua2V5ZG93bjxp
bnB1dCB0eXBlPSJ0ZXh0IiBpZD0ib25rZXlkb3duIiBuYW1lPSJ0ZXN0Ij48L2xhYmVsPgoJCTwv
ZGl2PgoJPC9mb3JtPgo8L2JvZHk+CjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>