[Laszlo-checkins] r13639 - in openlaszlo/trunk/WEB-INF/lps/lfc: services views

hqm@openlaszlo.org hqm at openlaszlo.org
Wed Apr 8 18:55:12 PDT 2009


Author: hqm
Date: 2009-04-08 18:55:09 -0700 (Wed, 08 Apr 2009)
New Revision: 13639

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/services/LzGlobalMouse.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
Log:
Change 20090407-hqm-T by hqm at badtzmaru.home on 2009-04-07 22:03:57 EDT
    in /Users/hqm/openlaszlo/trunk7
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: workaround for flash/firefox text selection bug

New Features:

Bugs Fixed: LPP-7957

Technical Reviewer: max
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:

+ add 'onmouseenter' event to canvas, sent by LzGlobalMouse. It is
generated when we see a mouse-move event after the mouse has left the
app window, as that means that the mouse is back in the app.

+ the workaround is to defocus whatever text is selected. This is the
only way I could find to get Flash to stop dragging the selection around
with the mouse.




    

Tests:



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzGlobalMouse.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzGlobalMouse.lzs	2009-04-09 01:43:27 UTC (rev 13638)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzGlobalMouse.lzs	2009-04-09 01:55:09 UTC (rev 13639)
@@ -1,6 +1,6 @@
 /**
  *
- * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
+ * @copyright Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.
  *            Use is subject to license terms.
  *
  * @affects lzglobalmouse
@@ -158,6 +158,13 @@
      */
     var onmouseleave :LzDeclaredEventClass = LzDeclaredEvent;
 
+    /** Sent whenever the mouse is dragged in the application window
+     * @access public
+     * @lzxtype event
+     */
+    var onmouseenter :LzDeclaredEventClass = LzDeclaredEvent;
+
+
     /** Sent whenever the mouse button is clicked
      * @access public
      * @lzxtype event
@@ -175,8 +182,11 @@
 
     /** @access private */
     function __mouseEvent (eventname:String, view:*) :void {
-        if (eventname == 'onmouseleave') { canvas.onmouseleave.sendEvent(); }
-        else if (eventname == 'onmousemove') { this.__movecounter++; }
+        if (eventname == 'onmouseleave') {
+            canvas.onmouseleave.sendEvent();
+        } else if (eventname == 'onmousemove') {
+            this.__movecounter++;
+        }
         var ev:LzDeclaredEventClass = this[eventname];
         if (ev) {
             if (ev.ready) { ev.sendEvent(view); }

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs	2009-04-09 01:43:27 UTC (rev 13638)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs	2009-04-09 01:55:09 UTC (rev 13639)
@@ -422,6 +422,12 @@
   */
 var onmouseleave = LzDeclaredEvent;
 
+/** Sent whenever the mouse is dragged into the application window
+  * @access public
+  * @lzxtype event
+  */
+var onmouseenter = LzDeclaredEvent;
+
 /** Sent whenever the number of created nodes changes 
   * @lzxtype event
   */



More information about the Laszlo-checkins mailing list