[Laszlo-checkins] r13195 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf

ptw@openlaszlo.org ptw at openlaszlo.org
Thu Mar 5 20:46:57 PST 2009


Author: ptw
Date: 2009-03-05 20:46:54 -0800 (Thu, 05 Mar 2009)
New Revision: 13195

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
Log:
Change 20090305-ptw-u by ptw at dueling-banjos.home on 2009-03-05 17:21:04 EST
    in /Users/ptw/OpenLaszlo/trunk-3
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix regression in input text:  should not interpret HTML markup

Bugs Fixed: LPP-7857  html tags not showing in inputtext

Technical Reviewer: hminsky, a.bargull at intensis.de (Message-ID: <8c61fad60903051513h3dfcd220hb00c0010ce76fee at mail.gmail.com>, pending)
QA Reviewer: aalappat (pending)

Details:
    html should be off by default in input text

Tests:
    Text case from bug



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as	2009-03-06 04:30:08 UTC (rev 13194)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as	2009-03-06 04:46:54 UTC (rev 13195)
@@ -74,8 +74,13 @@
 LzInputTextSprite.prototype.__initTextProperties = function (args) {
     var textclip = this.__LZtextclip;
 
-    // conditionalize this; set to false for inputtext for back compatibility with lps 2.1
-    textclip.html = true;
+    // NOTE [2009-03-05 ptw] Input text is NOT html by default.  We
+    // used to set this to true to fudge in the font styles as markup,
+    // but now we use the clip textFormat to do that directly.  Note
+    // that by setting this to false, the uses of htmlText below are
+    // equivalent to using text; whereas if you enable html with
+    // setHTML, then this should all magically work. :)
+    textclip.html = false;
 
     textclip.selectable = args.selectable;
     textclip.autoSize = false;
@@ -277,6 +282,10 @@
 }
 
 // This is the text without any formatting
+// NOTE [2009-03-05 ptw] Which is presumably what you want.  If you
+// enable html with setHTML, you still will get the text without
+// formatting.  But, how would you enter formatting in an input field
+// anyways?  This is not a rich-edit-text doo-dad.
 LzInputTextSprite.prototype.getText = function ( ){
   // We normalize swf's \r to \n
   return this.__LZtextclip.text.split('\r').join('\n');



More information about the Laszlo-checkins mailing list