mirror of https://github.com/node-red/node-red.git
Merge pull request #5400 from kazuhitoyokoi/master-fixdebugtab
Fix debug tab to copy displayed valuepull/5418/head
commit
c73a66afbe
|
|
@ -265,7 +265,13 @@ RED.utils = (function() {
|
|||
var copyPayload = $('<button class="red-ui-button red-ui-button-small"><i class="fa fa-clipboard"></i></button>').appendTo(copyTools).on("click", function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
RED.clipboard.copyText(msg,copyPayload,"clipboard.copyMessageValue");
|
||||
var payloadToCopy;
|
||||
if (typeof msg === "number") {
|
||||
payloadToCopy = obj.find(".red-ui-debug-msg-type-number").first().text();
|
||||
} else {
|
||||
payloadToCopy = msg;
|
||||
}
|
||||
RED.clipboard.copyText(payloadToCopy, copyPayload, "clipboard.copyMessageValue");
|
||||
})
|
||||
RED.popover.tooltip(copyPayload,RED._("node-red:debug.sidebar.copyPayload"));
|
||||
if (enablePinning && strippedKey !== undefined && strippedKey !== '') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue