[Laszlo-checkins] r14219 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml
hqm@openlaszlo.org
hqm at openlaszlo.org
Mon Jun 22 13:45:07 PDT 2009
Author: hqm
Date: 2009-06-22 13:45:06 -0700 (Mon, 22 Jun 2009)
New Revision: 14219
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Change 20090622-hqm-7 by hqm at badtzmaru.home on 2009-06-22 16:16:32 EDT
in /Users/hqm/openlaszlo/trunk6/WEB-INF/lps/lfc
for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc
Summary: fix for dhtml keyboard bug
New Features:
Bugs Fixed: LPP-8285, LPP-8279
Technical Reviewer: ptw
QA Reviewer: max
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
The code in LzKeyboardKernel.js which handles the OSX 'meta' key was messing up
the Windows/IE7 key down map.
Tests:
Test case below: press control, shift, or any alphanumeric key, and watch that the
status shows the key is pressed during the whole time you hold it down.
<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-22 20:19:33 UTC (rev 14218)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js 2009-06-22 20:45:06 UTC (rev 14219)
@@ -103,21 +103,21 @@
dirty = true;
}
- var meta = e['metaKey'];
- if ((dh['meta'] != null) != meta) {
- dh['meta'] = meta?224:null;
- delta['meta'] = meta;
- dirty = true;
- // Is this a quirk?
- delta['control'] = meta;
- // look for stuck keys (see LPP-8210)
- if (quirks['detectstuckkeys']) {
+ // look for stuck keys (see LPP-8210)
+ if (quirks['hasmetakey']) {
+ var meta = e['metaKey'];
+ if ((dh['meta'] != null) != meta) {
+ dh['meta'] = meta?224:null;
+ delta['meta'] = meta;
+ dirty = true;
+ // Is this a quirk?
+ delta['control'] = meta;
if (! meta) {
// If meta goes up, clear all the other keys
LzKeyboardKernel.__allKeysUp();
dirty = false;
}
- }
+ }
}
if (dirty && send) {
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-06-22 20:19:33 UTC (rev 14218)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-06-22 20:45:06 UTC (rev 14219)
@@ -514,7 +514,7 @@
,dom_breaks_focus: false
,inputtext_anonymous_div: false
,clipped_scrollbar_causes_display_turd: false
- ,detectstuckkeys: false
+ ,hasmetakey: false
,textgrabsinputtextfocus: false
,input_highlight_bug: false
@@ -724,7 +724,7 @@
if (browser.OS == 'Mac') {
// see LPP-8210
- quirks['detectstuckkeys'] = true;
+ quirks['hasmetakey'] = true;
}
// Adjust styles for quirks
More information about the Laszlo-checkins
mailing list