[Laszlo-checkins] r9445 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml
max@openlaszlo.org
max at openlaszlo.org
Tue Jun 3 11:17:37 PDT 2008
Author: max
Date: 2008-06-03 11:17:25 -0700 (Tue, 03 Jun 2008)
New Revision: 9445
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Change 20080602-maxcarlson-O by maxcarlson at Roboto on 2008-06-02 19:30:58 PDT
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Fix onmouseup in dhtml
New Features:
Bugs Fixed: LPP-6072 - lzpix/dhtml You can't end a mouse drag
Technical Reviewer: promanik
QA Reviewer: hminsky
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: LzSprite.js - Conditionalize __mouseisdown treatment for IE to ensue onmouseupoutside works. Move cleanup of LzMouseKernel.__lastMouseDown property from LzMouseKernel.js to __globalmouseup().
LzMouseKernel.js - Move cleanup of LzMouseKernel.__lastMouseDown property
to LzSprite.__globalmouseup().
Tests: See LPP-6072 for a testcase. Also, /test/lfc/legals/keyboardandmouse.lzx?lzr=dhtml&lzt=html shows both onmouseup and onmouseupoutside events when dragging inside the leftmost red box to the white canvas and releasing the mouse button in both IE and Firefox DHTML.
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js 2008-06-03 17:01:27 UTC (rev 9444)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js 2008-06-03 18:17:25 UTC (rev 9445)
@@ -69,7 +69,6 @@
if (LzMouseKernel.__lastMouseDown != null) {
// call mouseup on the sprite that got the last mouse down
LzMouseKernel.__lastMouseDown.__globalmouseup(e);
- LzMouseKernel.__lastMouseDown = null;
} else {
LzMouseKernel.__mouseEvent(e);
}
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2008-06-03 17:01:27 UTC (rev 9444)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2008-06-03 18:17:25 UTC (rev 9445)
@@ -809,8 +809,15 @@
}
} else if (eventname == 'onmouseup') {
e.cancelBubble = false;
- if (window['LzMouseKernel'] && LzMouseKernel.__lastMouseDown == this && this.__mouseisover) {
- this.__mouseisdown = false;
+ if (window['LzMouseKernel'] && LzMouseKernel.__lastMouseDown == this) {
+ if (this.quirks.fix_ie_clickable) {
+ // Must be done for onmouseupoutside to work
+ if (this.__mouseisover) {
+ this.__mouseisdown = false;
+ }
+ } else {
+ this.__mouseisdown = false;
+ }
} else {
skipevent = true;
}
@@ -846,6 +853,7 @@
this.__mouseEvent(e);
this.__mouseEvent('onmouseupoutside', true);
}
+ LzMouseKernel.__lastMouseDown = null;
}
LzSprite.prototype.setX = function ( x ){
More information about the Laszlo-checkins
mailing list