mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
removing element after selection
This commit is contained in:
parent
982d5ef906
commit
dc2b5bf0ea
@ -47,8 +47,6 @@ class ClipboardAction {
|
|||||||
selectFake() {
|
selectFake() {
|
||||||
const isRTL = document.documentElement.getAttribute('dir') == 'rtl';
|
const isRTL = document.documentElement.getAttribute('dir') == 'rtl';
|
||||||
|
|
||||||
this.removeFake();
|
|
||||||
|
|
||||||
this.fakeHandlerCallback = () => this.removeFake();
|
this.fakeHandlerCallback = () => this.removeFake();
|
||||||
this.fakeHandler =
|
this.fakeHandler =
|
||||||
this.container.addEventListener('click', this.fakeHandlerCallback) ||
|
this.container.addEventListener('click', this.fakeHandlerCallback) ||
|
||||||
@ -75,6 +73,8 @@ class ClipboardAction {
|
|||||||
|
|
||||||
this.selectedText = select(this.fakeElem);
|
this.selectedText = select(this.fakeElem);
|
||||||
this.copyText();
|
this.copyText();
|
||||||
|
|
||||||
|
this.removeFake();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user