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

clipboard export text stay highlighted even when button deselected

i.e. if you hit button twice text stays selected.
This commit is contained in:
Dave Conway-Jones 2017-02-28 22:54:13 +00:00
parent f5e6ca3e10
commit 424e854778

View File

@ -169,6 +169,7 @@ RED.clipboard = (function() {
$("#export-format-group > a").click(function(evt) { $("#export-format-group > a").click(function(evt) {
evt.preventDefault(); evt.preventDefault();
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) { if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
$("#clipboard-export").focus();
return; return;
} }
$(this).parent().children().removeClass('selected'); $(this).parent().children().removeClass('selected');
@ -192,6 +193,7 @@ RED.clipboard = (function() {
$("#export-range-group > a").click(function(evt) { $("#export-range-group > a").click(function(evt) {
evt.preventDefault(); evt.preventDefault();
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) { if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
$("#clipboard-export").focus();
return; return;
} }
$(this).parent().children().removeClass('selected'); $(this).parent().children().removeClass('selected');