1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

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