With this patch, I&#39;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&#39;ll see a 32 in the down keys array. Then hit any other keys, and the go in<br>
but don&#39;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">&lt;<a href="mailto:max@openlaszlo.org">max@openlaszlo.org</a>&gt;</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&#39;s changes to improve context menu support.  I had to hand-merge LzKeyboardKernel due to changes I&#39;d made related to LPP-8210.<br>

<br>
LzSprite -  [Andre: canceling event-bubbling for all mouse-events =&gt; this was already done for all browsers (except Firefox) and all events (except onmouseup). Why wasn&#39;t Firefox affected? =&gt; All other browsers set &quot;event.keyCode&quot; to &#39;0&#39; for mouse-events, only Firefox sets &quot;keyCode&quot; to &#39;undefined&#39;. Now take a look at &quot;LzKeyboardKernel.__keyboardEvent()&quot;, every event was canceled in that function if &quot;keyCode&quot; was &#39;&gt;= 0&#39;!]<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 &amp;&amp; eventname != &#39;oncontextmenu&#39;) 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&#39;s changes, plus I simplified the contextmenu test to if (eventname == &#39;oncontextmenu&#39; &amp;&amp; targ) - testing for (e.button == 2 &amp;&amp; eventname == &#39;onmouseup&#39;) is now handled in LzSprite.__clickDispatcher().<br>

<br>
Tests: lz.Keys.downKeysArray no longer has extra entries for meta keys, e.g. &#39;a&#39; 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>