[Laszlo-checkins] r14235 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml
hqm@openlaszlo.org
hqm at openlaszlo.org
Wed Jun 24 11:56:17 PDT 2009
Author: hqm
Date: 2009-06-24 11:56:16 -0700 (Wed, 24 Jun 2009)
New Revision: 14235
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
Log:
Change 20090624-hqm-f by hqm at badtzmaru.home on 2009-06-24 11:44:49 EDT
in /Users/hqm/openlaszlo/trunk-diamond
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: fix for lpp-8297, check for null ___lastfocus before dereferencing
New Features:
Bugs Fixed: LPP-8297
Technical Reviewer: max
QA Reviewer: ptw
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
+ check for lastfocus null before dereferencing it
Tests:
test case from bug report
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js 2009-06-24 18:43:49 UTC (rev 14234)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js 2009-06-24 18:56:16 UTC (rev 14235)
@@ -745,12 +745,19 @@
this.__LzInputDiv.focus();
} catch (err) {}
LzInputTextSprite.prototype.__lastfocus = this;
- setTimeout('LzInputTextSprite.prototype.__lastfocus.__LzInputDiv.select()', 50);
+ setTimeout(LzInputTextSprite.prototype.__selectLastFocused, 50);
//this.__LzInputDiv.select();
if (window['LzKeyboardKernel']) LzKeyboardKernel.__cancelKeys = false;
//Debug.write('select', this.uid, LzKeyboardKernel.__cancelKeys);
}
+LzInputTextSprite.prototype.__selectLastFocused = function () {
+ if (LzInputTextSprite.prototype.__lastfocus != null) {
+ LzInputTextSprite.prototype.__lastfocus.__LzInputDiv.select()
+ }
+}
+
+
LzInputTextSprite.prototype.setSelection = function (start, end=null){
if (end == null) { end = start; }
this._cancelblur = true;
More information about the Laszlo-checkins
mailing list