[Laszlo-dev] For Review: Change 20090601-maxcarlson-6 Summary: Fix contextmenu inconsistencies in DHTML

Henry Minsky hminsky at laszlosystems.com
Mon Jun 1 19:57:32 PDT 2009


With this patch, I'm seeing keys not being removed from the down keys array,
in Safari.

See the attached test case, and load it in lzr=dhtml, then hit the space
bar,
you'll see a 32 in the down keys array. Then hit any other keys, and the go
in
but don't come out on keyup.


On Mon, Jun 1, 2009 at 9:05 PM, Max Carlson <max at openlaszlo.org> wrote:

> Change 20090601-maxcarlson-6 by maxcarlson at Bank on 2009-06-01 17:44:36 PDT
>    in /Users/maxcarlson/openlaszlo/trunk-clean
>    for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Fix contextmenu inconsistencies in DHTML
>
> Bugs Fixed: LPP-8218 - DHTML: issues with contextmenu onmenuopen, dragging
>
> Technical Reviewer: andre.bargull at udo.edu
> QA Reviewer: hminsky
>
> Details: This includes all changes from
> http://www.openlaszlo.org/pipermail/laszlo-dev/2009-May/021166.html -
> Andre's changes to improve context menu support.  I had to hand-merge
> LzKeyboardKernel due to changes I'd made related to LPP-8210.
>
> LzSprite -  [Andre: canceling event-bubbling for all mouse-events => this
> was already done for all browsers (except Firefox) and all events (except
> onmouseup). Why wasn't Firefox affected? => All other browsers set
> "event.keyCode" to '0' for mouse-events, only Firefox sets "keyCode" to
> 'undefined'. Now take a look at "LzKeyboardKernel.__keyboardEvent()", every
> event was canceled in that function if "keyCode" was '>= 0'!]
>
> Moved detectstuckkeys from capabilities to quirks.  Added
> quirks.noglobaloncontextmenu  to deal with Firefox OS X context menu issue -
> https://bugzilla.mozilla.org/show_bug.cgi?id=443191.  __clickDispatcher()
> looks for quirks.noglobaloncontextmenu to fix context menus in Firefox OS X.
>  Remove unused (e.button == 2 && eventname != 'oncontextmenu') test from
> __mouseEvent().
>
> LzKeyboardKernel - [Andre move handling for control keys (ctrl, shift, alt)
> into separate function. It should be obvious why having a single function
> for both, mouse-events and keyboard-events, is a bad idea (see keyCode issue
> from above).]  Hand-merged tests for meta key/stuck keys checked into
> r14021.
>
> LzMouseKernel - Andre's changes, plus I simplified the contextmenu test to
> if (eventname == 'oncontextmenu' && targ) - testing for (e.button == 2 &&
> eventname == 'onmouseup') is now handled in LzSprite.__clickDispatcher().
>
> Tests: lz.Keys.downKeysArray no longer has extra entries for meta keys,
> e.g. 'a' after pressing/releasing apple-a on OS X (LPP-8210).
>  test/contextmenu/lpp-6980.lzx?lzr=dhtml shows custom context menus for red
> and blue boxes and default context menus for purple, yellow and the canvas
> across Firefox and Safari OS X and Firefox, IE and Safari on Windows.
>  test/lfc/legals/keyboardandmouse.lzx?lzr=dhtml runs as before in Firefox
> and
> Safari OS X and Firefox, IE and Safari on Windows.
>
> Files:
> M      WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js
> 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/20090601-maxcarlson-6.tar
>



-- 
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20090601/9de27ef2/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: select2.lzx
Type: application/octet-stream
Size: 2144 bytes
Desc: not available
Url : http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20090601/9de27ef2/select2.obj


More information about the Laszlo-dev mailing list