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

Key: LPP-6125
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: P0 P0
Assignee: Max Carlson
Reporter: Josh Crowley
Votes: 0
Watchers: 0
Operations

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

onmouseupoutside events not triggered outside of canvas in DHTML, work fine in SWF (blocker for LPP-1788)

Created: 05/Jun/08 09:10 PM   Updated: 27/Jun/08 11:14 PM
Component/s: Laszlo Foundation Classes (LFC), Kernel - DHTML
Affects Version/s: RingDing (4.1)
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

Environment: FF2, XP

Severity: Minor
Fixed in Change#: 10,108
Runtime: DHTML
Fix in hand: False


 Description  « Hide
Run the following example in DHTML:

<canvas width="300" height="300" bgcolor="0x00FF00">
    <view width="100" height="100" x="20" bgcolor="0xFF0000">
        <handler name="onmouseover">
            Debug.write('over');
        </handler>
        <handler name="onmousedragin">
            Debug.write('drag');
        </handler>
        <handler name="onmouseupoutside">
            Debug.write('upoutside');
        </handler>
    </view>
</canvas>

If you click inside the red square and drag out into the green area (the canvas area) and release, you'll see the "onmouseupoutside" event firing. However, if you drag and release outside the canvas, the "onmouseupoutside" event never gets triggered.

Run it again in SWF7 or 8 (haven't tried 9 yet):

If you click inside the red square and drag out to anywhere outside the green and release, the "onmouseupoutside" still gets triggered.

This is the cause for LPP-1788, and why images get stuck when the mouse is released outside the canvas. I can try to make a crude workaround, but everything I've been trying so far just looks ugly (like dropping the dragged image unconditionally if it reaches the edge of the canvas, or if the cursor leaves and then reenters the canvas), and I think this is a more extensive problem that should probably be fixed.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Amy Muntz - 25/Jun/08 07:13 AM
max - is this handled now?

Max Carlson - 27/Jun/08 11:14 PM
r10108 | max | 2008-06-27 23:13:19 -0700 (Fri, 27 Jun 2008) | 16 lines
Changed paths:
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js

Change 20080627-maxcarlson-e by maxcarlson@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