Merge pull request #1527 from junsred/prevent-clipboard-being-set-as-null
prevent clipboard being set as null
This commit is contained in:
@@ -419,7 +419,11 @@ class HTML5Window
|
||||
|
||||
private function handleCutOrCopyEvent(event:ClipboardEvent):Void
|
||||
{
|
||||
event.clipboardData.setData("text/plain", Clipboard.text);
|
||||
var text = Clipboard.text;
|
||||
if (text == null) {
|
||||
text = "";
|
||||
}
|
||||
event.clipboardData.setData("text/plain", text);
|
||||
if (event.cancelable) event.preventDefault();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user