updates
This commit is contained in:
+5
-3
@@ -93,9 +93,11 @@ export class Ut {
|
||||
*/
|
||||
static copyToClipboard(target) {
|
||||
|
||||
const isTextField = target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement;
|
||||
|
||||
if (navigator.clipboard) {
|
||||
|
||||
if (target instanceof Node) {
|
||||
if (isTextField) {
|
||||
|
||||
target.select();
|
||||
target.setSelectionRange(0, 99999);
|
||||
@@ -110,7 +112,7 @@ export class Ut {
|
||||
|
||||
let tval = null;
|
||||
|
||||
if (target instanceof Node) {
|
||||
if (isTextField) {
|
||||
|
||||
if (target.dataset.notrusted) {
|
||||
delete target.dataset.notrusted;
|
||||
@@ -137,7 +139,7 @@ export class Ut {
|
||||
|
||||
textarea.remove();
|
||||
|
||||
if (target instanceof Node) {
|
||||
if (isTextField) {
|
||||
|
||||
target.dataset.notrusted = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user