[Laszlo-dev] For Review: Change 20090514-maxcarlson-7, Summary: Don't send extra mouse events for context menu clicks

André Bargull andre.bargull at udo.edu
Fri May 15 07:31:39 PDT 2009


Not approved.

Add to the testcase from the bugreport also handlers to lz.GlobalMouse:
<handler name="onmousedown" reference="lz.GlobalMouse">
Debug.debug("global onmousedown");
</handler>
<handler name="onmouseup" reference="lz.GlobalMouse">
Debug.debug("global onmouseup");
</handler>
<handler name="onclick" reference="lz.GlobalMouse">
Debug.debug("global onclick");
</handler>

Here are my results from SWF8:
1) right click on canvas to show context-menu, then left click on canvas
DEBUG: global onmousedown
DEBUG: global onmouseup

2) right click on canvas, then left click on red view
DEBUG: global onmousedown
view onmousedown
DEBUG: global onmouseup
view onmouseup
DEBUG: global onclick
view onclick

3) right click on red view, then left click on red view
DEBUG: global onmousedown
view onmousedown
DEBUG: global onmouseup
view onmouseup
DEBUG: global onclick
view onclick

4) right click on red view, then left click on canvas
DEBUG: global onmousedown
DEBUG: global onmouseup

5) left click on canvas
DEBUG: global onmousedown
DEBUG: global onmouseup

6) left click on red view
DEBUG: global onmousedown
view onmousedown
DEBUG: global onmouseup
view onmouseup
DEBUG: global onclick
view onclick

[Note: onclick events are only send for views, not for global 
mouse-events, so this the expected output.]

Now the results for DHTML (FF3):
1) nothing
2) DEBUG: global onclick
3) DEBUG: global onclick
4) nothing

5)
DEBUG: global onmousedown
DEBUG: global onmouseup
DEBUG: global onclick

6)
DEBUG: global onmousedown
view onmousedown
DEBUG: global onmouseup
view onmouseup
DEBUG: global onclick
view onclick
DEBUG: global onclick
[Note: Two global onclick events here!]



> Change 20090514-maxcarlson-7 by maxcarlson at Bank on 2009-05-14 17:35:05  
> PDT
>      in /Users/maxcarlson/openlaszlo/trunk-clean
>      for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Don't send extra mouse events for context menu clicks
>
> Bugs Fixed: LPP-8189 - Right click fires an erroneous mousedown and  
> mouseup in DHTML.
>
> Technical Reviewer: hminsky
> QA Reviewer: mdemmon
>
> Details: LzContextMenuKernel - Don't use delegates to hide context  
> menus.
>
> LzMouseKernel - While a context menu is showing, prevent mouse events  
> from being sent - and hide the context menu when an onclick event is  
> received.  Register for global onclick events to hide the context menu.
>
> Tests: See LPP-8189 - behavior in swf and dhtml now matches
>
> Files:
> M      WEB-INF/lps/lfc/kernel/dhtml/LzContextMenuKernel.lzs
> M      WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090514-maxcarlson-7.tar
>   


More information about the Laszlo-dev mailing list