Only create a hidden input if not simpleCopy

This commit is contained in:
Grant Moyer 2019-08-14 23:20:03 -04:00
parent d96f458a1b
commit 4892e7aa2b
4 changed files with 1 additions and 7 deletions

View File

@ -23,6 +23,7 @@ const CopyPaste = {
}
return {success: true, seconds: clipboardSeconds};
} else {
this.createHiddenInput(text);
try {
if (document.execCommand('copy')) {
return {success: true};

View File

@ -415,9 +415,6 @@ const DetailsView = Backbone.View.extend({
if (!fieldText) {
return;
}
if (!CopyPaste.simpleCopy) {
CopyPaste.createHiddenInput(fieldText);
}
const copyRes = CopyPaste.copy(fieldText);
this.fieldCopied({ source: editView, copyRes: copyRes });
}

View File

@ -58,9 +58,6 @@ const FieldView = Backbone.View.extend({
if (!text) {
return;
}
if (!CopyPaste.simpleCopy) {
CopyPaste.createHiddenInput(text);
}
copyRes = CopyPaste.copy(text);
this.trigger('copy', { source: this, copyRes: copyRes });
return;

View File

@ -137,7 +137,6 @@ const GeneratorView = Backbone.View.extend({
},
btnOkClick: function() {
CopyPaste.createHiddenInput(this.password);
CopyPaste.copy(this.password);
this.trigger('result', this.password);
this.remove();