flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mamsel...@apache.org
Subject [1/2] git commit: [flex-sdk] [refs/heads/develop] - FIXED - FLEX-34231 StageText displays wrong text
Date Mon, 21 Apr 2014 21:25:57 GMT
Repository: flex-sdk
Updated Branches:
  refs/heads/develop e21416426 -> 8150c264f


FIXED - FLEX-34231 StageText displays wrong text


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/063dcdc2
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/063dcdc2
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/063dcdc2

Branch: refs/heads/develop
Commit: 063dcdc244e89ba2e0e435880b619813b4666184
Parents: c5b0ff1
Author: mamsellem <maurice.amsellem@systar.com>
Authored: Mon Apr 21 23:08:55 2014 +0200
Committer: mamsellem <maurice.amsellem@systar.com>
Committed: Mon Apr 21 23:08:55 2014 +0200

----------------------------------------------------------------------
 .../supportClasses/ScrollableStageText.as       | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/063dcdc2/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
b/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
index c03ef69..da971cc 100644
--- a/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
+++ b/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
@@ -1736,14 +1736,20 @@ public class ScrollableStageText extends UIComponent  implements IStyleableEdita
         {
             restoreStageText();
         }
-        else if (savedSelectionAnchorIndex > 0 || savedSelectionActiveIndex > 0)
+        else
         {
-            // Even if the StageText has been retrieved from the cache, its
-            // selection is not preserved. Restore the selection if necessary.
-            if (savedSelectionAnchorIndex <= _text.length && savedSelectionActiveIndex
<= _text.length)
-                stageText.selectRange(savedSelectionAnchorIndex, savedSelectionActiveIndex);
-            savedSelectionAnchorIndex = 0;
-            savedSelectionActiveIndex = 0;
+            //always restore text, even if recycled, as it may have changed when the SST
was not on stage cf.   https://issues.apache.org/jira/browse/FLEX-34231
+            // for now, we ignore external changes to other props
+            stageText.text = _text ;
+            if (savedSelectionAnchorIndex > 0 || savedSelectionActiveIndex > 0)
+            {
+                // Even if the StageText has been retrieved from the cache, its
+                // selection is not preserved. Restore the selection if necessary.
+                if (savedSelectionAnchorIndex <= _text.length && savedSelectionActiveIndex
<= _text.length)
+                    stageText.selectRange(savedSelectionAnchorIndex, savedSelectionActiveIndex);
+                savedSelectionAnchorIndex = 0;
+                savedSelectionActiveIndex = 0;
+            }
         }
 
         if (stageText != null)


Mime
View raw message