Change 20090831-hqm-N by [email protected] on 2009-08-31 13:01:15 EDT
in /Users/hqm/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: (DHTML) ignore spurious mouse events when user dismisses
contextmenu
New Features:
Bugs Fixed: LPP-8218, LPP-8189
Technical Reviewer: max
QA Reviewer: andre
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Change to make behavior when menu is dismissed match SWF more closely.
+ When the user wants to dismiss a context menu without selecting any
items, they move the mouse outside of the menu and either release the
button or click the button. In either case, we do not want these
mousedown,mouseup, and click events to be sent to whatever view they
happen to be over.
This change modifies LzMouseKernel#__sendEvent to check if the context
menu is being hidden due to a mousedown, and if so, sets flags to
ignore the next mouseup and onclick events.
Tests:
[test case from LPP-8189]
<canvas>
<view width="200" height="200" bgcolor="0xff0000">
<handler name="onmousedown">
// Expected: Fires in swf8 and dhtml for left mouse click
// Unexpected: Fires in dhtml for right mouse click
Debug.write("onmousedown");
</handler>
<handler name="onmouseup">
// Expected: Fires in swf8 and dhtml for left mouse click
// Unexpected: Fires in dhtml for right mouse click
Debug.write("onmouseup");
</handler>
<handler name="onclick">
// Expected: Fires in swf8 and dhtml for left mouse click
Debug.write("onclick");
</handler>
</view>
</canvas>
In DHTML, these two cases should print no mouse events to the debugger
[1] Move mouse over red view, click right to display context menu.
Press left button over an item, and while holding, drag mouse out of
context menu, but still over the red view, and then release button to
dismiss menu.
No events should print to the debugger.
[1] Move mouse over red view, click right to display context menu.
Move mouse out of context menu, but still over red view, and click
left to dismiss menu.
No events should print to the debugger.
Files:
M WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090831-hqm-N.tar
_______________________________________________
Laszlo-reviews mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews