|
|
|
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: 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 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 // 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 (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> |
||||||||||||||||||||||||||||||||||||||||||||||||||||
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.