prevent clipboard being set as null

This commit is contained in:
Junsred
2022-04-28 15:27:24 +03:00
parent 1f954d268f
commit c0a77a01fb

View File

@@ -419,7 +419,11 @@ class HTML5Window
private function handleCutOrCopyEvent(event:ClipboardEvent):Void
{
event.clipboardData.setData("text/plain", Clipboard.text);
var text = "";
if (Clipboard.text != null) {
text = Clipboard.text;
}
event.clipboardData.setData("text/plain", text);
if (event.cancelable) event.preventDefault();
}