[Laszlo-checkins] r8203 - in openlaszlo/branches/pagan-deities: . WEB-INF/lps/lfc/kernel/swf
max@openlaszlo.org
max at openlaszlo.org
Thu Mar 6 14:19:55 PST 2008
Author: max
Date: 2008-03-06 14:19:54 -0800 (Thu, 06 Mar 2008)
New Revision: 8203
Modified:
openlaszlo/branches/pagan-deities/
openlaszlo/branches/pagan-deities/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
openlaszlo/branches/pagan-deities/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
Log:
Merged revisions 8202 via svnmerge from
http://svn.openlaszlo.org/openlaszlo/trunk
.......
r8202 | max | 2008-03-06 14:15:12 -0800 (Thu, 06 Mar 2008) | 26 lines
Change 20080306-maxcarlson-k by maxcarlson at Roboto on 2008-03-06 13:08:28 PST
in /Users/maxcarlson/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Reset selection when when selection position is out of bounds
New Features:
Bugs Fixed: LPP-5449 - Seems like inputtext selection position is not reset until input text is focused or setSelection() is invoked
Technical Reviewer: promanik
QA Reviewer: pkang at laszlosystems.com
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: LzTextSprite.as - Track selection position in setSelection. If the string passed to setText() is smaller than the selection, reset the selection.
LzInputTextSprite.as - If the string passed to setText() is smaller than the selection, reset the selection.
Tests: See LPP-5449
.......
Property changes on: openlaszlo/branches/pagan-deities
___________________________________________________________________
Name: svnmerge-integrated
- /openlaszlo/branches/paperpie:1-6504,6506-6574,6576-7135,7137-7235 /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497,6509,6661,7097,7872 /openlaszlo/trunk:1-7950,7983,8021,8062,8144-8146,8176,8182
+ /openlaszlo/branches/paperpie:1-6504,6506-6574,6576-7135,7137-7235 /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497,6509,6661,7097,7872 /openlaszlo/trunk:1-7950,7983,8021,8062,8144-8146,8176,8182,8202
Modified: openlaszlo/branches/pagan-deities/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
===================================================================
--- openlaszlo/branches/pagan-deities/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as 2008-03-06 22:15:12 UTC (rev 8202)
+++ openlaszlo/branches/pagan-deities/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as 2008-03-06 22:19:54 UTC (rev 8203)
@@ -1,7 +1,7 @@
/**
* LzInputTextSprite.as
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @topic Kernel
@@ -296,6 +296,7 @@
* @param String t: the string to which to set the text
*/
LzInputTextSprite.prototype.setText = function ( t ){
+ // Keep in sync with LzTextSprite.setText()
//Debug.write('LzInputTextSprite.setText', this, t);
if (typeof(t) == 'undefined' || t == null) {
t = "";
@@ -329,6 +330,12 @@
LzIdle.callOnIdle(scrolldel);
}
+ // Fix for lpp-5449
+ var l = t.length;
+ if (this._selectionstart > l || this._selectionend > l) {
+ this.setSelection(l);
+ }
+
//@event ontext: Sent whenever the text in the field changes.
//this.owner.ontext.sendEvent(t);
}
Modified: openlaszlo/branches/pagan-deities/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
===================================================================
--- openlaszlo/branches/pagan-deities/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as 2008-03-06 22:15:12 UTC (rev 8202)
+++ openlaszlo/branches/pagan-deities/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as 2008-03-06 22:19:54 UTC (rev 8203)
@@ -1,7 +1,7 @@
/**
* LzTextSprite.as
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @topic Kernel
@@ -461,6 +461,7 @@
* @param String t: the string to which to set the text
*/
LzTextSprite.prototype.setText = function ( t ){
+ // Keep in sync with LzTextSprite.setText()
if (typeof(t) == 'undefined' || t == 'null') {
t = "";
} else if (typeof(t) != "string") {
@@ -496,6 +497,12 @@
LzIdle.callOnIdle(scrolldel);
}
+ // Fix for lpp-5449
+ var l = t.length;
+ if (this._selectionstart > l || this._selectionend > l) {
+ this.setSelection(l);
+ }
+
//@event ontext: Sent whenever the text in the field changes.
//this.ontext.sendEvent( );
}
@@ -800,6 +807,10 @@
end = start;
}
+ // Fix for lpp-5449
+ this._selectionstart = start;
+ this._selectionend = end;
+
Selection.setSelection( start , end );
}
More information about the Laszlo-checkins
mailing list