[Laszlo-checkins] r14316 - in openlaszlo/branches/4.2: WEB-INF/lps/lfc/kernel/swf WEB-INF/lps/lfc/services lps/includes/source
ptw@openlaszlo.org
ptw at openlaszlo.org
Mon Jul 13 13:40:34 PDT 2009
Author: ptw
Date: 2009-07-13 13:40:30 -0700 (Mon, 13 Jul 2009)
New Revision: 14316
Modified:
openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzKeyboardKernel.as
openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
openlaszlo/branches/4.2/WEB-INF/lps/lfc/services/LzKeys.lzs
openlaszlo/branches/4.2/lps/includes/source/embednew.js
Log:
Change 20090713-ptw-A by ptw at dueling-banjos.home on 2009-07-13 16:36:02 EDT
in /Users/ptw/OpenLaszlo/4.2
for http://svn.openlaszlo.org/openlaszlo/branches/4.2
Summary: Revert r14287
Bugs Fixed: LPP-8283 Alt tab issue when switching tasks in IE7/Win
Technical Reviewer: aalappat at laszlosystems.com (pending)
Details:
Reverting this change. It did not help and it broke tabbing.
Tests:
TBD
Modified: openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzKeyboardKernel.as
===================================================================
--- openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzKeyboardKernel.as 2009-07-13 08:00:08 UTC (rev 14315)
+++ openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzKeyboardKernel.as 2009-07-13 20:40:30 UTC (rev 14316)
@@ -47,32 +47,10 @@
,__codes: {16: 'shift', 17: 'control', 18: 'alt'}
,__callback: null
,__scope: null
- ,__listeneradded: false
,setCallback: function (scope, funcname) {
this.__scope = scope;
this.__callback = funcname;
- if (LzSprite.prototype.quirks.swf_swallows_focus_events) {
- // Enable focus on sprite root so we can receive onfocus
- // events in IE when the browser window does
- if (this.__listeneradded == false) {
- var listener = {
- onSetFocus: function (o, n) {
- if ((o == null) || (n == null)) {
- var how = '';
-// if ($debug) {
-// how = Debug.formatToString("focus %#w -> %#w", o, n);
-// }
- lz.Keys.__allKeysUp(how);
-// } else if ($debug) {
-// Debug.debug("focus %#w -> %#w", o, n);
- }
- }
- }
- Selection.addListener(listener);
- this.__listeneradded = true;
- }
- }
- }
+ }
// Called by lz.embed when the browser window regains focus
,__allKeysUp: function () {
var delta = {};
Modified: openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
===================================================================
--- openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2009-07-13 08:00:08 UTC (rev 14315)
+++ openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2009-07-13 20:40:30 UTC (rev 14316)
@@ -24,14 +24,7 @@
is = _root.attachMovie('empty', 'spriteroot', 1000);
}
this.__LZmovieClipRef = is;
- if (LzSprite.prototype.quirks.swf_swallows_focus_events) {
- is.attachMovie( LzSprite.prototype.__LZclickregion, "$mcB",
- LzSprite.prototype.BUTTON_DEPTH, {_width: 0, _height: 0} );
- if (debug) {
- is.$mcB._dbg_name = 'default focus';
- }
- Selection.setFocus(is.$mcB);
- }
+
this.__LZsvdepth = 1;
} else {
this.__LZdepth = newowner.immediateparent.sprite.__LZsvdepth++;
@@ -53,19 +46,6 @@
ys, this.y)
};
-LzSprite.prototype.quirks = {
- swf_swallows_focus_events: false
-}
-
-LzSprite.prototype.__updateQuirks = function () {
- var quirks = this.quirks;
- if (System.capabilities.os.indexOf('Win') == 0) {
- quirks.swf_swallows_focus_events = true;
- }
-}
-
-LzSprite.prototype.__updateQuirks();
-
LzSprite.prototype.capabilities = {
rotation: true
// Avoid scaling canvas to percentage values - SWF already scales the viewport size, so take window size literally to avoid scaling twice
Modified: openlaszlo/branches/4.2/WEB-INF/lps/lfc/services/LzKeys.lzs
===================================================================
--- openlaszlo/branches/4.2/WEB-INF/lps/lfc/services/LzKeys.lzs 2009-07-13 08:00:08 UTC (rev 14315)
+++ openlaszlo/branches/4.2/WEB-INF/lps/lfc/services/LzKeys.lzs 2009-07-13 20:40:30 UTC (rev 14316)
@@ -142,10 +142,7 @@
* Trampoline so we can call from lz.embed
* @access private
*/
- function __allKeysUp (how='unknown'):void {
-// if ($debug) {
-// Debug.debug("[%6.2f] __allKeysUp: %s", (new Date).getTime() % 1000000, how);
-// }
+ function __allKeysUp ():void {
LzKeyboardKernel.__allKeysUp();
}
Modified: openlaszlo/branches/4.2/lps/includes/source/embednew.js
===================================================================
--- openlaszlo/branches/4.2/lps/includes/source/embednew.js 2009-07-13 08:00:08 UTC (rev 14315)
+++ openlaszlo/branches/4.2/lps/includes/source/embednew.js 2009-07-13 20:40:30 UTC (rev 14316)
@@ -644,18 +644,18 @@
if (d != null) this.callMethod("lz.Keys.__mousewheelEvent(" + d + ")");
}
,/** @access private */
- _gotFocus: function(how='unknown') {
- lz.embed._broadcastMethod('_sendAllKeysUp', how);
+ _gotFocus: function() {
+ lz.embed._broadcastMethod('_sendAllKeysUp');
}
,/** @access private */
- _sendAllKeysUpSWF: function (how='unknown') {
- this.callMethod("lz.Keys.__allKeysUp(" + how + ")");
+ _sendAllKeysUpSWF: function () {
+ this.callMethod("lz.Keys.__allKeysUp()");
}
,/** @access private */
- _sendAllKeysUpDHTML: function (how='unknown') {
+ _sendAllKeysUpDHTML: function () {
// How to deal with multiple DHTML apps on a page?
- if (lz['Keys'] && lz.Keys['__allKeysUp']) {
- lz.Keys.__allKeysUp(how);
+ if (LzKeyboardKernel && LzKeyboardKernel['__allKeysUp']) {
+ LzKeyboardKernel.__allKeysUp();
}
}
,/** @access private */
@@ -783,11 +783,9 @@
lz.embed.attachEventHandler(window, 'beforeunload', lz.embed, '_cleanupHandlers');
// Notice that you got focus
+lz.embed.attachEventHandler(window, 'focus', lz.embed, '_gotFocus');
if (lz.embed.browser.isIE) {
- // attachEventHandler does not work for IE?
- document.onfocusin = function () { lz.embed._gotFocus('document focusin'); }
-} else {
- lz.embed.attachEventHandler(window, 'focus', lz.embed, '_gotFocus');
+ lz.embed.attachEventHandler(window, 'activate', lz.embed, '_gotFocus');
}
// for backward compatibility
More information about the Laszlo-checkins
mailing list