[Laszlo-dev] For Review: Change 20090424-maxcarlson-I Summary: Add support for canvas.focustrap for DHTML runtimes

Max Carlson max at openlaszlo.org
Fri Apr 24 22:22:01 PDT 2009


Change 20090424-maxcarlson-I by maxcarlson at Bank.local on 2009-04-24  
22:07:50 PDT
     in /Users/maxcarlson/openlaszlo/trunk-clean
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Add support for canvas.focustrap for DHTML runtimes

Bugs Fixed: LPP-8090 - Add API to enable/disable tabbing outside the  
application

Technical Reviewer: ptw
QA Reviewer: mdemmon

Details: swf*/LzKeyboardKernel.as - Add stub implementation of  
setGlobalFocusTrap().

LzSprite - Add disableglobalfocustrap capability, enabled only for  
DHTML.

dhtml/LzKeyboardKernel.js - Add implementation of setGlobalFocusTrap()  
that sets a flag to override calls to setKeyboardControl(), locking  
keyboard focus on.  Add force argument to setKeyboardControl() to  
override focus locking - currently used by LzDebug.

LzKeys - Add setGlobalFocusTrap() which delegates to LzKeyboardKernel.

LzDebug - Use force argument of setKeyboardControl() to disable  
keyboard control and allow the eval field to accept keyboard input  
when the app has canvas.focustrap set to true.

LaszloCanvas - Add processing for the focustrap attribute to  
construct() - warn and ignore when the disableglobalfocustrap  
capability isn't set to true.  Add setter for focustrap that delegates  
to LzKeys.setGlobalFocusTrap().

Tests: Load examples/components/edittext_example.lzx? 
lzr=dhtml&debug=true&lzt=html and tab from the address bar into the  
app.  Enough tabs should allow the focus to escape the application and  
eventually begin tabbing back into it again.  Setting canvas.focustrap  
to true will prevent this behavior, restricting tabbing to just the  
application - similar to swf.

Files:
M      WEB-INF/lps/lfc/kernel/swf/LzKeyboardKernel.as
M      WEB-INF/lps/lfc/kernel/swf/LzSprite.as
M      WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js
M      WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M      WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.as
M      WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
M      WEB-INF/lps/lfc/services/LzKeys.lzs
M      WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
M      WEB-INF/lps/lfc/views/LaszloCanvas.lzs

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090424-maxcarlson-I.tar


More information about the Laszlo-dev mailing list