Updated Branches:
  refs/heads/develop 61aa3601c -> ab14cf9f8

FLEX-34053 - avoid copy operation remove all text in maskedtextinput


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

Branch: refs/heads/develop
Commit: ab14cf9f8d65f23fdd4c21d15834859bcd346f38
Parents: 61aa360
Author: Carlos Rovira <carlosrov...@apache.org>
Authored: Thu Jan 23 11:24:14 2014 +0100
Committer: Carlos Rovira <carlosrov...@apache.org>
Committed: Thu Jan 23 11:24:14 2014 +0100

----------------------------------------------------------------------
 .../experimental/src/spark/components/MaskedTextInput.as      | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/ab14cf9f/frameworks/projects/experimental/src/spark/components/MaskedTextInput.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/experimental/src/spark/components/MaskedTextInput.as 
b/frameworks/projects/experimental/src/spark/components/MaskedTextInput.as
index f8c0bb2..8286822 100644
--- a/frameworks/projects/experimental/src/spark/components/MaskedTextInput.as
+++ b/frameworks/projects/experimental/src/spark/components/MaskedTextInput.as
@@ -22,6 +22,7 @@ package spark.components {
 
     import flashx.textLayout.edit.SelectionState;
     import flashx.textLayout.operations.CompositeOperation;
+    import flashx.textLayout.operations.CopyOperation;
     import flashx.textLayout.operations.DeleteTextOperation;
     import flashx.textLayout.operations.InsertTextOperation;
 
@@ -442,6 +443,12 @@ package spark.components {
 
                 an = ac = selectionActivePosition - offset;
             }
+            //copy
+            else if(event.operation is CopyOperation)
+            {
+                return; // avoid to remove all text on copy operation
+            }
+
 
             selectAll();
             insertText(outputText);

Reply via email to