You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/08/15 07:09:44 UTC

[3/3] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34034 handle degenerate case when copying single newline into TextInput

FLEX-34034 handle degenerate case when copying single newline into TextInput


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

Branch: refs/heads/develop
Commit: c03cf753daadd21eefea2ade7627f7e6eb3cae41
Parents: 78260ec
Author: Alex Harui <ah...@apache.org>
Authored: Thu Aug 14 22:07:06 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Aug 14 22:09:42 2014 -0700

----------------------------------------------------------------------
 .../projects/spark/src/spark/components/RichEditableText.as       | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/c03cf753/frameworks/projects/spark/src/spark/components/RichEditableText.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/RichEditableText.as b/frameworks/projects/spark/src/spark/components/RichEditableText.as
index ed5f26d..283d5ea 100644
--- a/frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ b/frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -4767,6 +4767,9 @@ package spark.components
                             TextClipboard.importToScrap(pastedText, 
                                 TextConverter.PLAIN_TEXT_FORMAT);
                     }
+                    // don't do anything if nothing left on clipboard
+                    if (pastedText.length == 0)
+                        event.preventDefault();
                 }
             }
             else if (op is DeleteTextOperation || op is CutOperation)