From dc2b5bf0eaac389d196beeb457de43179688e563 Mon Sep 17 00:00:00 2001 From: vitormalencar Date: Wed, 24 Feb 2021 22:47:49 +0100 Subject: [PATCH] removing element after selection --- src/clipboard-action.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clipboard-action.js b/src/clipboard-action.js index 7275bed3..fda4be3e 100644 --- a/src/clipboard-action.js +++ b/src/clipboard-action.js @@ -47,8 +47,6 @@ class ClipboardAction { selectFake() { const isRTL = document.documentElement.getAttribute('dir') == 'rtl'; - this.removeFake(); - this.fakeHandlerCallback = () => this.removeFake(); this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || @@ -75,6 +73,8 @@ class ClipboardAction { this.selectedText = select(this.fakeElem); this.copyText(); + + this.removeFake(); } /**