[Laszlo-checkins] r14200 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml
hqm@openlaszlo.org
hqm at openlaszlo.org
Fri Jun 19 13:37:29 PDT 2009
Author: hqm
Date: 2009-06-19 13:37:28 -0700 (Fri, 19 Jun 2009)
New Revision: 14200
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js
Log:
Change 20090619-hqm-a by hqm at badtzmaru.home on 2009-06-19 16:29:44 EDT
in /Users/hqm/openlaszlo/trunk5
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: fix for missing keyboard events in DHTML
New Features:
Bugs Fixed: LPP-8279, LPP-8285
Technical Reviewer: ptw
QA Reviewer: andre
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
logic in _updateControlKeys was broken, always returning false
Tests:
observer that the 'a', 'shift' and 'ctrl' key are indicated as down when you
press the keys. This still is broken in IE7, for some other reason, but works
in Firefox/Windows and Firefox/OSX now
<canvas>
<simplelayout spacing="4"/>
<text id="ctrlkey" width="300"/>
<text id="shiftkey" width="300"/>
<text id="akey" width="300"/>
<text id="timer" width="300"/>
<handler reference="lz.Idle" name="onidle">
ctrlkey.setAttribute('text',"isCtrlDown: "+ lz.Keys.isKeyDown( "control" ));
shiftkey.setAttribute('text', "isShiftDown: "+ lz.Keys.isKeyDown( "shift" ));
akey.setAttribute('text', "a key: "+ lz.Keys.isKeyDown( "a" ));
timer.setAttribute('text', new Date().getTime());
</handler>
</canvas>
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js 2009-06-19 20:32:27 UTC (rev 14199)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js 2009-06-19 20:37:28 UTC (rev 14200)
@@ -83,7 +83,7 @@
if ((dh['alt'] != null) != alt) {
dh['alt'] = alt?18:null;
delta['alt'] = alt;
- dirty = send;
+ dirty = true;
if (quirks['alt_key_sends_control']) {
delta['control'] = delta['alt'];
}
@@ -93,21 +93,21 @@
if ((dh['control'] != null) != ctrl) {
dh['control'] = ctrl?17:null;
delta['control'] = ctrl;
- dirty = send;
+ dirty = true;
}
var shift = e['shiftKey'];
if ((dh['shift'] != null) != shift) {
dh['shift'] = shift?16:null;
delta['shift'] = shift;
- dirty = send;
+ dirty = true;
}
var meta = e['metaKey'];
if ((dh['meta'] != null) != meta) {
dh['meta'] = meta?224:null;
delta['meta'] = meta;
- dirty = send;
+ dirty = true;
// Is this a quirk?
delta['control'] = meta;
// look for stuck keys (see LPP-8210)
@@ -120,7 +120,7 @@
}
}
- if (dirty) {
+ if (dirty && send) {
var scope = LzKeyboardKernel.__scope;
var callback = LzKeyboardKernel.__callback;
if (scope && scope[callback]) {
More information about the Laszlo-checkins
mailing list