<?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>18357</bug_id>
          
          <creation_ts>2008-04-08 02:55:03 -0700</creation_ts>
          <short_desc>[GTK] Enter on buttons doesn&apos;t work</short_desc>
          <delta_ts>2008-04-19 19:50:43 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marco Barisione">marco.barisione</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alp</cc>
    
    <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>76591</commentid>
    <comment_count>0</comment_count>
    <who name="Marco Barisione">marco.barisione</who>
    <bug_when>2008-04-08 02:55:03 -0700</bug_when>
    <thetext>It&apos;s possible to navigate among links and widgets using TAB and shift-TABS but then it&apos;s impossible to emulate a click on a button using the ENTER key.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76592</commentid>
    <comment_count>1</comment_count>
      <attachid>20402</attachid>
    <who name="Marco Barisione">marco.barisione</who>
    <bug_when>2008-04-08 03:06:49 -0700</bug_when>
    <thetext>Created attachment 20402
Set the text of the event to &apos;\r&apos; when the return/enter key is pressed

Note that I used &apos;\r&apos; instead of &apos;\n&apos; because it&apos;s what WebCore use. Probably it&apos;s better to use &apos;\n&apos; modifying WebCore to allow this, but I think there could be a lot of places in WebCore where the code assumes that enter is &apos;\r&apos;. What do you think?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78033</commentid>
    <comment_count>2</comment_count>
    <who name="Alp Toker">alp</who>
    <bug_when>2008-04-17 17:22:48 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Created an attachment (id=20402) [edit]
&gt; Set the text of the event to &apos;\r&apos; when the return/enter key is pressed
&gt; 
&gt; Note that I used &apos;\r&apos; instead of &apos;\n&apos; because it&apos;s what WebCore use. Probably
&gt; it&apos;s better to use &apos;\n&apos; modifying WebCore to allow this, but I think there
&gt; could be a lot of places in WebCore where the code assumes that enter is &apos;\r&apos;.
&gt; What do you think?
&gt; 

Yeah. While this fix looks like it&apos;ll work I think it&apos;d be great to investigate if this can be fixed better in WebCore.

Marco: It&apos;s up to you. I can land this patch if you&apos;re willing to follow it up with a proper fix (if necessary), or I can leave it out till we get a better idea of how to proceed. It might be worth talking with ap (Alexey) about this one, he has a good eye for input issues.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78068</commentid>
    <comment_count>3</comment_count>
      <attachid>20402</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-04-17 23:56:49 -0700</bug_when>
    <thetext>Comment on attachment 20402
Set the text of the event to &apos;\r&apos; when the return/enter key is pressed

It&apos;s surprising that gdk_keyval_to_unicode doesn&apos;t handle these keys - what is the story behind this? I couldn&apos;t find any hints in documentation. Are there any other keys that need to be special cased?

Yes, it is correct to use \r here - JavaScript code on the Web expects to see 0x13 in keypress.charCode, so this is not just internal to WebCore.

I have noticed that windowsKeyCodeForKeyEvent doesn&apos;t handle GDK_ISO_Enter and GDK_KP_Enter - this looks worth fixing, too.

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78083</commentid>
    <comment_count>4</comment_count>
    <who name="Marco Barisione">marco.barisione</who>
    <bug_when>2008-04-18 03:41:30 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; It&apos;s surprising that gdk_keyval_to_unicode doesn&apos;t handle these keys - what is
&gt; the story behind this? I couldn&apos;t find any hints in documentation. Are there
&gt; any other keys that need to be special cased?

I don&apos;t know (I will ping someone on IRC about this) but probably it would return \n not \r, so we would need to special case it even if gdk was changed.

Alp, can you commit the patch?

&gt; I have noticed that windowsKeyCodeForKeyEvent doesn&apos;t handle GDK_ISO_Enter and
&gt; GDK_KP_Enter - this looks worth fixing, too.

Opened another bug on this (bug #18576).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78284</commentid>
    <comment_count>5</comment_count>
    <who name="Alp Toker">alp</who>
    <bug_when>2008-04-19 19:50:43 -0700</bug_when>
    <thetext>Landed in r32246.

Barisione, can you open another bug if there are other places this needs to be fixed or if it turns out we can fix this in a better place?

Cheers</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>20402</attachid>
            <date>2008-04-08 03:06:49 -0700</date>
            <delta_ts>2008-04-17 23:56:49 -0700</delta_ts>
            <desc>Set the text of the event to &apos;\r&apos; when the return/enter key is pressed</desc>
            <filename>return-text.patch</filename>
            <type>text/plain</type>
            <size>1897</size>
            <attacher name="Marco Barisione">marco.barisione</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvcGxhdGZvcm0vZ3RrL0tleUV2ZW50R3RrLmNwcAo9PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0t
LSBXZWJDb3JlL3BsYXRmb3JtL2d0ay9LZXlFdmVudEd0ay5jcHAJKHJldmlzaW9uZSAzMTYzMykK
KysrIFdlYkNvcmUvcGxhdGZvcm0vZ3RrL0tleUV2ZW50R3RrLmNwcAkoY29waWEgbG9jYWxlKQpA
QCAtNDcwLDE5ICs0NzAsMjYgQEAKIAogc3RhdGljIFN0cmluZyBzaW5nbGVDaGFyYWN0ZXJTdHJp
bmcoZ3VpbnQgdmFsKQogewotICAgIGdsb25nIG53YzsKLSAgICBTdHJpbmcgcmV0VmFsOwotICAg
IGd1bmljaGFyIGMgPSBnZGtfa2V5dmFsX3RvX3VuaWNvZGUodmFsKTsKLSAgICBndW5pY2hhcjIq
IHVjaGFyMTYgPSBnX3VjczRfdG9fdXRmMTYoJmMsIDEsIDAsICZud2MsIDApOworICAgIHN3aXRj
aCAodmFsKSB7CisgICAgICAgIGNhc2UgR0RLX0lTT19FbnRlcjoKKyAgICAgICAgY2FzZSBHREtf
S1BfRW50ZXI6CisgICAgICAgIGNhc2UgR0RLX1JldHVybjoKKyAgICAgICAgICAgIHJldHVybiBT
dHJpbmcoIlxyIik7CisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICBndW5pY2hhciBjID0g
Z2RrX2tleXZhbF90b191bmljb2RlKHZhbCk7CisgICAgICAgICAgICBnbG9uZyBud2M7CisgICAg
ICAgICAgICBndW5pY2hhcjIqIHVjaGFyMTYgPSBnX3VjczRfdG9fdXRmMTYoJmMsIDEsIDAsICZu
d2MsIDApOwogCi0gICAgaWYgKHVjaGFyMTYpCi0gICAgICAgIHJldFZhbCA9IFN0cmluZygoVUNo
YXIqKXVjaGFyMTYsIG53Yyk7Ci0gICAgZWxzZQotICAgICAgICByZXRWYWwgPSBTdHJpbmcoKTsK
KyAgICAgICAgICAgIFN0cmluZyByZXRWYWw7CisgICAgICAgICAgICBpZiAodWNoYXIxNikKKyAg
ICAgICAgICAgICAgICByZXRWYWwgPSBTdHJpbmcoKFVDaGFyKil1Y2hhcjE2LCBud2MpOworICAg
ICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgIHJldFZhbCA9IFN0cmluZygpOwogCi0gICAg
Z19mcmVlKHVjaGFyMTYpOworICAgICAgICAgICAgZ19mcmVlKHVjaGFyMTYpOwogCi0gICAgcmV0
dXJuIHJldFZhbDsKKyAgICAgICAgICAgIHJldHVybiByZXRWYWw7CisgICAgfQogfQogCiAvLyBL
ZWVwIHRoaXMgaW4gc3luYyB3aXRoIHRoZSBvdGhlciBwbGF0Zm9ybSBldmVudCBjb25zdHJ1Y3Rv
cnMKSW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdl
TG9nCShyZXZpc2lvbmUgMzE3MTkpCisrKyBXZWJDb3JlL0NoYW5nZUxvZwkoY29waWEgbG9jYWxl
KQpAQCAtMSwzICsxLDE1IEBACisyMDA4LTA0LTA4ICBNYXJjbyBCYXJpc2lvbmUgIDxtYXJjby5i
YXJpc2lvbmVAY29sbGFib3JhLmNvLnVrPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAo
T09QUyEpLgorCisgICAgICAgIGh0dHA6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lk
PTE4MzU3CisgICAgICAgIFtHVEtdIEVudGVyIG9uIGJ1dHRvbnMgZG9lc24ndCB3b3JrCisKKyAg
ICAgICAgKiBwbGF0Zm9ybS9ndGsvS2V5RXZlbnRHdGsuY3BwOgorICAgICAgICAoV2ViQ29yZTo6
c2luZ2xlQ2hhcmFjdGVyU3RyaW5nKTogU2V0IHRoZSB0ZXh0IG9mIGEga2V5Ym9hcmQgZXZlbnQg
Zm9yCisgICAgICAgIEdES19JU09fRW50ZXIsIEdES19LUF9FbnRlciwgR0RLX1JldHVybiB0byAi
XHIiIGluc3RlYWQgb2YgYW4gZW1wdHkKKyAgICAgICAgc3RyaW5nLgorCiAyMDA4LTA0LTA4ICBE
YW4gQmVybnN0ZWluICA8bWl0ekBhcHBsZS5jb20+CiAKICAgICAgICAgUmV2aWV3ZWQgYnkgTWFj
aWVqIFN0YWNob3dpYWsuCg==
</data>
<flag name="review"
          id="8883"
          type_id="1"
          status="+"
          setter="ap"
    />
          </attachment>
      

    </bug>

</bugzilla>