[Here's a revised version which I think makes things work about as well as they 
can.  There's an issue because some browsers seem to think that right-click 
should toggle the native menu and others don't.  I've made LZX menus toggle, as 
best I can.]

Change maxcarlson-20101021-FXR by [email protected] on 2010-10-21 
08:15:07 MDT
    in /Users/maxcarlson/openlaszlo/trunk2
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: UPDATED^2: Fix DHTML context menus

Bugs Fixed: LPP-9442 - regression in DHTML context menu

Technical Reviewer: ptw
QA Reviewer: hminsky

Details: Updated to deal with button === 2 event properly.  This fixes
Firefox for Steve style two-finger right clicks.  IE still doesn't
show native context menus.  The second update makes control-click work
again in Safari, and makes the context menu toggle off/on on repeated
clicks.

test/contextmenu/api.lzx - Update to eliminate warnings, add test for 
showBuiltInItems().

LzContextMenuKernel - Don't show context menus twice.

LzSprite - Forward button === 2 mouse events to shared 
LzMouseKernel.__handleContextMenu().

LzMouseKernel - == -> === where safe.  Delegate global oncontextmenu events to 
LzMouseKernel.__handleContextMenu().  Make __handleContextMenu() deal with 
dome2 events properly, e.g. Pass contextmenu object directly to 
__showContextMenu().  Hide shown OL context menus before browser native menus 
appear.

Tests: test/contextmenu/api.lzx?lzr=dhtml to runs correctly.

Files:
M       test/contextmenu/api.lzx
M       WEB-INF/lps/lfc/kernel/dhtml/LzContextMenuKernel.lzs
M       WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M       WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js

Changeset: 
http://svn.openlaszlo.org/openlaszlo/patches/maxcarlson-20101021-FXR.tar

Reply via email to