Change maxcarlson-20110104-aPG by maxcarl...@friendly on 2011-01-04 16:39:07 PST
    in /Users/maxcarlson/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: UPDATED: Support onmouseover/out when dragging on touch devices

Bugs Fixed: LPP-8904 - Support touch and gesture events

Technical Reviewer: ptw
QA Reviewer: hminsky

Details: I noticed a regression in lzpix DHTML with this change where photos 
wouldn't stop dragging.  Put back code for handling onmousedown/up in 
__clickDispatcher().  Move code to 'Blur any focused inputtexts - see LPP-8475' 
inside onmousdown test where it should have been - see r14771:

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js   2009-09-17 
08:00:10 UTC (rev 14770)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js   2009-09-17 
09:46:54 UTC (rev 14771)
@@ -1401,6 +1401,11 @@
        // track which sprite the mouse went down on
        this.__mouseisdown = true;
        LzMouseKernel.__lastMouseDown = this;
+        // blur any focused inputtexts - see LPP-8475
+        var focusedsprite = LzInputTextSprite.prototype.__focusedSprite;
+        if (focusedsprite && focusedsprite != this) {
+            focusedsprite.deselect();
+        }

Otherwise:

LzSprite - Only listen for sprite click events on the clickdiv (or its 
children).  Explicitly listen for global events on the appcontainer, and call 
__globalClickDispatcher() to send global events.  Remove noop in setSource().  
Add globalClickDispatcher() to handle global mouse events.  Generate 
onmouseover/out when dragging on touch devices.  Track the last dive the mouse 
went out on, to prevent spurious global over/out events.  

LzMouseKernel - Add slot for __lastMouseOut.

Tests: demos/house.lzx?lzr=dhtml now shows over/out for buttons when they're 
being clicked.  test/lfc/legals/keyboardandmouse.lzx?lzr=dhtml runs as before.  
Photos drag normally in lzpix.

Files:
M       WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M       WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js

Changeset: 
http://svn.openlaszlo.org/openlaszlo/patches/maxcarlson-20110104-aPG.tar

Reply via email to