Fix copy-to-clipboard action in FireFox

This commit is contained in:
Nick O'Leary
2021-03-04 10:45:30 +00:00
parent 15715a2968
commit aa5e47b462

View File

@@ -89,9 +89,12 @@ RED.clipboard = (function() {
text: RED._("clipboard.export.copy"),
click: function() {
if (activeTab === "red-ui-clipboard-dialog-export-tab-clipboard") {
copyText($("#red-ui-clipboard-dialog-export-text").val());
RED.notify(RED._("clipboard.nodesExported"),{id:"clipboard"});
var flowData = $("#red-ui-clipboard-dialog-export-text").val();
// Close the dialog first otherwise FireFox won't focus the hidden
// clipboard element in copyText
$( this ).dialog( "close" );
copyText(flowData);
RED.notify(RED._("clipboard.nodesExported"),{id:"clipboard"});
} else {
var flowToExport = $("#red-ui-clipboard-dialog-export-text").val();
var selectedPath = activeLibraries[activeTab].getSelected();