Author: pbr
Date: 2007-09-27 13:15:21 -0700 (Thu, 27 Sep 2007)
New Revision: 6645
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
Log:
Change 20070926-Philip-4 by [EMAIL PROTECTED] on 2007-09-26 20:26:00 EDT
in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: DHTML: onkeyup/onkeydown sent twice
New Features:
Bugs Fixed: LPP-4267
Technical Reviewer: max
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
There are two code paths that are generating onkeyup/onkeydown events in dhtml
(The details are in LPP-4267). I modified LzInputTextSprite.js to not generate
onkeyup/onkeydown. It still generates onchange though. The path that generates
onkeyup/onkeydown is in LzKeys, the same as swf.
Tests:
See LPP-4267. With this change, a single keyup/keydown is generated for each
key click/release.
smokecheck.lzx
Files:
M WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070926-Philip-4.tar
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
2007-09-27 18:01:43 UTC (rev 6644)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
2007-09-27 20:15:21 UTC (rev 6645)
@@ -253,7 +253,7 @@
//Debug.info('__textEvent', eventname, keycode);
if (this.owner) {
- this.owner.inputtextevent(eventname, keycode);
+ // Generate the event. onkeyup/onkeydown sent by LzKeys.js
if (eventname == 'onkeydown' || eventname == 'onkeyup') {
var v = this.__LzInputDiv.value;
if (v != this.text) {
@@ -261,6 +261,9 @@
this.owner.inputtextevent('onchange', v);
}
}
+ else {
+ this.owner.inputtextevent(eventname, keycode);
+ }
}
}
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins