[Laszlo-checkins] r12322 - in openlaszlo/trunk/WEB-INF/lps/lfc: kernel/swf views
bargull@openlaszlo.org
bargull at openlaszlo.org
Wed Jan 7 00:27:07 PST 2009
Author: bargull
Date: 2009-01-07 00:27:03 -0800 (Wed, 07 Jan 2009)
New Revision: 12322
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
openlaszlo/trunk/WEB-INF/lps/lfc/views/LzInputText.lzs
Log:
Change 20090107-bargull-U15 by bargull at dell--p4--2-53 on 2009-01-07 00:57:35
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: fix strange 13 character multiline inputtext bug
New Features:
Bugs Fixed: LPP-7569
Technical Reviewer: max
QA Reviewer: fgou
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
The selection needs to recreated so the insertion point stays correct.
Also update the setter in inputtext.
(btw, it's 13 characters because in "getTextHeight()" the htmlText is set to "__ypgSAMPLE__", which is exactly 13 characters long.)
Tests:
see both testcases at LPP-7569
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as 2009-01-07 05:57:01 UTC (rev 12321)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as 2009-01-07 08:27:03 UTC (rev 12322)
@@ -1,7 +1,7 @@
/**
* LzTextSprite.as
*
- * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2009 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @topic Kernel
@@ -324,6 +324,14 @@
var tct = textclip.htmlText;
var tcp = textclip.wordWrap;
+ var sf = targetPath(textclip);
+ var start = -1, end;
+ if (Selection.getFocus() === sf) {
+ // we need to reset selection when the textclip is focused (LPP-7569)
+ start = Selection.getBeginIndex();
+ end = Selection.getEndIndex();
+ }
+
textclip.autoSize = true;
// Make sure the test text does not wrap!
textclip.wordWrap = false;
@@ -335,6 +343,10 @@
textclip.htmlText = tct;
textclip._width = tcw;
textclip._height = tch;
+
+ if (start != -1) {
+ Selection.setSelection(start, end);
+ }
}
return h;
}
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LzInputText.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LzInputText.lzs 2009-01-07 05:57:01 UTC (rev 12321)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LzInputText.lzs 2009-01-07 08:27:03 UTC (rev 12322)
@@ -1,6 +1,6 @@
/**
*
- * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2009 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @access public
@@ -187,7 +187,7 @@
if ( this.multiline &&
this.sizeToHeight &&
this.height != isprite.getTextfieldHeight() ) {
- this.setHeight(isprite.getTextfieldHeight());
+ this.$lzc$set_height(isprite.getTextfieldHeight());
}
if (this.ontext.ready) this.ontext.sendEvent(value);
} else if (eventname == 'onblur') {
More information about the Laszlo-checkins
mailing list