[Laszlo-dev] For Review: Change 20080213-maxcarlson-4 Summary: Avoid sending duplicate shift, ctrl, option events in inputtext

Max Carlson max at openlaszlo.org
Wed Feb 13 17:38:13 PST 2008


Change 20080213-maxcarlson-4 by maxcarlson at Roboto on 2008-02-13  
17:34:25 PST
     in /Users/maxcarlson/openlaszlo/trunk
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Avoid sending duplicate shift, ctrl, option events in inputtext

New Features:

Bugs Fixed: LPP-4267 - Onkeyup and onkeydown events fire twice in  
edittext and inputtext

Technical Reviewer: promanik
QA Reviewer: a.bargull at intensis.de
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details: Avoid sending shift, ctrl and option keys by preventing the  
keyboard state from getting dirtied.


Tests: This runs consistently in swf and dhtml (FF osx and IE 6)
<canvas height="300">
<simplelayout/>
  <edittext id="ex" width="100">
  <handler name="onkeydown" args="kc">
  Debug.warn('keydown %w', kc);
  </handler>
  <handler name="onkeyup" args="kc">
  Debug.warn('keyup %w', kc);
  </handler>
  </edittext>

  <inputtext id="ix" width="100">
  <handler name="onkeydown" args="kc">
  Debug.warn('keydown %w', kc);
  </handler>
  <handler name="onkeyup" args="kc">
  Debug.warn('keyup %w', kc);
  </handler>
  </inputtext>

  <button>foo</button>

  <handler name="onkeydown" reference="LzKeys" args="kc">
  Debug.warn('global keydown %w', kc);
  </handler>

  <handler name="onkeyup" reference="LzKeys" args="kc">
  Debug.warn('global keyup %w', kc);
  </handler>
  </canvas>


Files:
M      WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080213-maxcarlson-4.tar


More information about the Laszlo-dev mailing list