We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
keydown
1 parent eadb3cd commit 9e78a99Copy full SHA for 9e78a99
1 file changed
quote-selection.js
@@ -21,9 +21,12 @@ export function subscribe(container: Element): Subscription {
21
}
22
23
export function install(container: Element) {
24
+ const firstInstall = installed === 0
25
installed += containers.has(container) ? 0 : 1
26
containers.set(container, 1)
- document.addEventListener('keydown', quoteSelection)
27
+ if (firstInstall) {
28
+ document.addEventListener('keydown', quoteSelection)
29
+ }
30
if (!edgeBrowser) {
31
container.addEventListener('copy', onCopy)
32
0 commit comments