With this patch, I'm seeing keys not being removed from the down keys array, in Safari.<br><br>See the attached test case, and load it in lzr=dhtml, then hit the space bar,<br>you'll see a 32 in the down keys array. Then hit any other keys, and the go in<br>
but don't come out on keyup.<br><br><br><div class="gmail_quote">On Mon, Jun 1, 2009 at 9:05 PM, Max Carlson <span dir="ltr"><<a href="mailto:max@openlaszlo.org">max@openlaszlo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Change 20090601-maxcarlson-6 by maxcarlson@Bank on 2009-06-01 17:44:36 PDT<br>
in /Users/maxcarlson/openlaszlo/trunk-clean<br>
for <a href="http://svn.openlaszlo.org/openlaszlo/trunk" target="_blank">http://svn.openlaszlo.org/openlaszlo/trunk</a><br>
<br>
Summary: Fix contextmenu inconsistencies in DHTML<br>
<br>
Bugs Fixed: LPP-8218 - DHTML: issues with contextmenu onmenuopen, dragging<br>
<br>
Technical Reviewer: <a href="mailto:andre.bargull@udo.edu" target="_blank">andre.bargull@udo.edu</a><br>
QA Reviewer: hminsky<br>
<br>
Details: This includes all changes from <a href="http://www.openlaszlo.org/pipermail/laszlo-dev/2009-May/021166.html" target="_blank">http://www.openlaszlo.org/pipermail/laszlo-dev/2009-May/021166.html</a> - Andre's changes to improve context menu support. I had to hand-merge LzKeyboardKernel due to changes I'd made related to LPP-8210.<br>
<br>
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'!]<br>
<br>
Moved detectstuckkeys from capabilities to quirks. Added quirks.noglobaloncontextmenu to deal with Firefox OS X context menu issue - <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=443191" target="_blank">https://bugzilla.mozilla.org/show_bug.cgi?id=443191</a>. __clickDispatcher() looks for quirks.noglobaloncontextmenu to fix context menus in Firefox OS X. Remove unused (e.button == 2 && eventname != 'oncontextmenu') test from __mouseEvent().<br>
<br>
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.<br>
<br>
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().<br>
<br>
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<br>
Safari OS X and Firefox, IE and Safari on Windows.<br>
<br>
Files:<br>
M WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js<br>
M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js<br>
M WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js<br>
<br>
Changeset: <a href="http://svn.openlaszlo.org/openlaszlo/patches/20090601-maxcarlson-6.tar" target="_blank">http://svn.openlaszlo.org/openlaszlo/patches/20090601-maxcarlson-6.tar</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br><br><br>