History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-4120
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: -- --
Assignee: Unassigned
Reporter: Max Carlson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

LzTrack interferes w/ window drag w/ FF DHTML

Created: 11/Jun/07 01:44 PM   Updated: 12/Sep/07 02:11 PM
Component/s: Kernel - DHTML
Affects Version/s: Legals
Fix Version/s: Legals, 4.0.3, 4.0.5WaffleCone

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 5,377
Runtime: N/A
Fix in hand: False


 Description  « Hide
From http://forum.openlaszlo.org/showthread.php?t=9495

The following code demonstrates that a window will reset its starting position to the very first position over and over when dragged w/ FF DHTML:

Code:

<canvas id="maincanvas" width="100%" height="100%" validate="false" debug="false" proxied="false" bgcolor="0x00aaaa"> <debug x="650" y="200" width="800" height="400" fontsize="12"/> <!--include href="incubator/inspector/inspector.lzx"/--> <!-- frametimer/--> <class name="mt" extends="view" bgcolor="red"> <handler name="oninit"> LzTrack.register(this, "mt"); LzTrack.activate("mt"); </handler> </class> <window x="300" y="400" width="200" height="200"> <mt x="100" y="100" width="50" height="50"/> </window> </canvas>

IE7 DHTML and SWF mode work OK, just FF DHTML is broken.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Max Carlson - 11/Jun/07 03:08 PM
From http://forum.openlaszlo.org/showthread.php?t=9499

This code demonstrates a problem whereby LzTrack mouse handlers stop responding after a window is dragged w/ FF DHTML:

Code:

<canvas id="maincanvas" width="100%" height="100%" validate="false" debug="false" proxied="false" bgcolor="0x00aaaa"> <debug x="650" y="200" width="800" height="400" fontsize="12"/> <!--include href="incubator/inspector/inspector.lzx"/--> <!-- frametimer/--> <class name="mt" extends="view" bgcolor="red"> <handler name="oninit"> LzTrack.register(this, "mt"); LzTrack.activate("mt"); </handler> <handler name="onmousetrackover"> this.setAttribute("bgcolor", blue); </handler> <handler name="onmousetrackout"> this.setAttribute("bgcolor", red); </handler> </class> <window x="300" y="400" width="200" height="200"> <mt x="0" y="0" width="50" height="50"/> <mt x="100" y="100" width="50" height="50"/> </window> </canvas>

Upon starting the test, notice that mouseovers change the red boxes to blue. Next, drag the window far horizontally. The lower right box no longer responds, but the top left one does. Now, drag the window far vertically. The top left box stops responding.

The test case works properly for SWF and IE7 DHTML, but fails w/ FF DHTML.

Max Carlson - 11/Jun/07 04:38 PM
Author: max
Date: 2007-06-11 16:36:01 -0700 (Mon, 11 Jun 2007)
New Revision: 5377

Modified:
   openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Change 20070611-maxcarlson-s by maxcarlson@plastik on 2007-06-11 14:51:36 PDT
    in /Users/maxcarlson/openlaszlo/legals-clean
    for http://svn.openlaszlo.org/openlaszlo/branches/legals

Summary: Fix LzTrack with draggable parent

New Features:

Bugs Fixed: LPP-4120 - LzTrack interferes w/ window drag w/ FF DHTML

Technical Reviewer: promanik
QA Reviewer: jcrowley
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details: Don't set parent div's __poscachedirty to false. Less aggressive, but it fixes this case.
    

Tests: testcase in LPP-4120 passes in firefox DHTML.



Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2007-06-11 23:22:36 UTC (rev 5376)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2007-06-11 23:36:01 UTC (rev 5377)
@@ -1204,12 +1204,15 @@
         }
     }
 
+ /* This breaks in firefox - see LPP-4120
     // set this and parent's dirty to false
     var p = this;
     while (p != this.__rootSprite) {
         p.__poscachedirty = false;
         p = p.__parent;
     }
+ */
+ this.__poscachedirty = false;
     this.__poscache = pos;
     return pos;
 }


_______________________________________________
Laszlo-checkins mailing list
Laszlo-checkins@openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Mamye Kratt - 28/Jun/07 05:41 PM
(4.0 branch (4.0.3) local build r5544)
Fixed

Mamye Kratt - 28/Jun/07 05:41 PM
Needs to be tested in legals.

Mamye Kratt - 17/Jul/07 11:53 AM
Need to test in legals.

Mamye Kratt - 12/Sep/07 02:11 PM
(wafflecone branch build r6430)
Example now works the same in dhtml as swf.

Need to use this testfile, not the one in the description:

<canvas id="maincanvas" width="100%" height="100%" validate="false" debug="false" proxied="false" bgcolor="0x00aaaa"> <debug x="650" y="200" width="800" height="400" fontsize="12"/> <!--include href="incubator/inspector/inspector.lzx"/--> <!-- frametimer/--> <class name="mt" extends="view" bgcolor="red"> <handler name="oninit"> LzTrack.register(this, "mt"); LzTrack.activate("mt"); </handler> <handler name="onmousetrackover"> this.setAttribute("bgcolor", blue); </handler> <handler name="onmousetrackout"> this.setAttribute("bgcolor", red); </handler> </class> <window x="300" y="400" width="200" height="200"> <mt x="0" y="0" width="50" height="50"/> <mt x="100" y="100" width="50" height="50"/> </window> </canvas>