[Laszlo-checkins] r10108 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml

max@openlaszlo.org max at openlaszlo.org
Fri Jun 27 23:13:26 PDT 2008


Author: max
Date: 2008-06-27 23:13:19 -0700 (Fri, 27 Jun 2008)
New Revision: 10108

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
Log:
Change 20080627-maxcarlson-e by maxcarlson at Roboto on 2008-06-27 22:51:00 PDT
    in /Users/maxcarlson/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix onmouseupoutside events in dhtml

Bugs Fixed: LPP-5547 - DHTML: Dragging the bottom of the "Check out" vertical tab to the right and then to the left, without a click and moved the mouse in both directions (left and right) the vertIcal tab follows the mouse., LPP-6125 - onmouseupoutside events not triggered outside of canvas in DHTML, work fine in SWF (blocker for LPP-1788)

Technical Reviewer: promanik
QA Reviewer: hminsky

Details: Listen for onmouseup on window.top if window.top != window.

Tests:  Dragging photos outside the window in lzpix and releasing button, testcases in LPP-5547 and LPP-6125



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js	2008-06-28 06:06:28 UTC (rev 10107)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js	2008-06-28 06:13:19 UTC (rev 10108)
@@ -91,10 +91,12 @@
             lz.embed.attachEventHandler(document, 'mousemove', LzMouseKernel, '__mouseEvent');
             lz.embed.attachEventHandler(document, 'mousedown', LzMouseKernel, '__mouseEvent');
             lz.embed.attachEventHandler(document, 'mouseup', LzMouseKernel, '__mouseupEvent');
+            if (window.top != window) lz.embed.attachEventHandler(window.top.document, 'mouseup', LzMouseKernel, '__mouseupEvent');
         } else {
             lz.embed.removeEventHandler(document, 'mousemove', LzMouseKernel, '__mouseEvent');
             lz.embed.removeEventHandler(document, 'mousedown', LzMouseKernel, '__mouseEvent');
             lz.embed.removeEventHandler(document, 'mouseup', LzMouseKernel, '__mouseupEvent');
+            if (window.top != window) lz.embed.removeEventHandler(window.top.document, 'mouseup', LzMouseKernel, '__mouseupEvent');
         }
         // Prevent context menus in Firefox 1.5 - see LPP-2678
         document.oncontextmenu = ison ? LzMouseKernel.__mouseEvent : null;



More information about the Laszlo-checkins mailing list