Dioc schrieb:
> Hello,
>
> I found a problem in Internet Explorer 6 related to "keypress" event
> handling.
> I have an instance of qx.ui.form.TextField and attach to it the "keypress"
> event handler that should process "Enter" key pressing.
> The problem is "keypress" event is fired twice for "Enter" key. There is not
> such problem in Firefox 2.
>
> The code snippet:
> var txtSearchText = new qx.ui.form.TextField(this.tr("Search Keyword"));
> txtSearchText.set({
> width : "80%"
> });
> txtSearchText.addEventListener("keypress", function(oEvent) {
> if (oEvent.getKeyIdentifier() == "Enter") {
> console.log("txtSearchText.keypress");
> console.open();
> }
> }, txtSearchText);
> layRow1.add(txtSearchText);
>
> Any suggestions, solutions and workarounds are welcomed.
>
> Best regards,
> Dioc
>
>
I have just fixed this in the current trunk. You could upgrade to the
current trunk or apply this patch to the class
qx.event.handler.KeyEventHandler.js:
===================================================================
---
trunk/qooxdoo/frontend/framework/source/class/qx/event/handler/KeyEventHandler.js
2007-07-06 15:08:50 UTC (rev 8854)
+++
trunk/qooxdoo/frontend/framework/source/class/qx/event/handler/KeyEventHandler.js
2007-07-06 15:25:07 UTC (rev 8855)
@@ -338,22 +338,24 @@
{
8 : "Backspace", // The Backspace (Back) key.
9 : "Tab", // The Horizontal Tabulation (Tab) key.
+
+ // Note: This key identifier is also used for the
+ // Return (Macintosh numpad) key.
+ 13 : "Enter", // The Enter key.
+
+ 27 : "Escape", // The Escape (Esc) key.
32 : "Space" // The Space (Spacebar) key.
+
},
/** maps the keycodes of non printable keys to key identifiers */
_keyCodeToIdentifierMap :
{
- 13 : "Enter", // The Enter key.
-
- // Note: This key identifier is also used for the
- // Return (Macintosh numpad) key.
16 : "Shift", // The Shift key.
17 : "Control", // The Control (Ctrl) key.
18 : "Alt", // The Alt (Menu) key.
20 : "CapsLock", // The CapsLock key
224 : "Meta", // The Meta key. (Apple Meta and Windows key)
- 27 : "Escape", // The Escape (Esc) key.
37 : "Left", // The Left Arrow key.
38 : "Up", // The Up Arrow key.
39 : "Right", // The Right Arrow key.
===================================================================
Best Fabian
--
Fabian Jakobs
JavaScript Framework Developer
1&1 Internet AG
Brauerstraße 48
76135 Karlsruhe
Amtsgericht Montabaur HRB 6484
Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger,
Matthias Greve, Robert Hoffmann, Norbert Lang, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel