Comparing version 3.1.3 to 3.1.4
11
index.js
@@ -24,6 +24,9 @@ export async function clippie(data, {reject = false} = {}) { | ||
document.body.appendChild(el); | ||
el.select(); | ||
const success = document.execCommand("copy"); | ||
if (success) numSuccess++; | ||
document.body.removeChild(el); | ||
try { | ||
el.select(); | ||
const success = document.execCommand("copy"); | ||
if (success) numSuccess++; | ||
} finally { | ||
document.body.removeChild(el); | ||
} | ||
} | ||
@@ -30,0 +33,0 @@ } |
{ | ||
"name": "clippie", | ||
"version": "3.1.3", | ||
"version": "3.1.4", | ||
"description": "Teeny-tiny browser clipboard copy", | ||
@@ -16,9 +16,9 @@ "author": "silverwind", | ||
"blob-polyfill": "7.0.20220408", | ||
"eslint": "8.29.0", | ||
"eslint-config-silverwind": "65.0.0", | ||
"jsdom": "20.0.3", | ||
"updates": "13.2.4", | ||
"versions": "10.4.1", | ||
"vitest": "0.25.8" | ||
"eslint": "8.37.0", | ||
"eslint-config-silverwind": "65.1.3", | ||
"jsdom": "21.1.1", | ||
"updates": "13.2.9", | ||
"versions": "10.4.2", | ||
"vitest": "0.29.8" | ||
} | ||
} |
@@ -29,4 +29,4 @@ # clippie | ||
Firefox needs `dom.events.asyncClipboard.clipboardItem` in `about:config` to enable image copying. Track [Bug 1619947](https://bugzilla.mozilla.org/show_bug.cgi?id=1619947) for updates. | ||
Firefox needs `dom.events.asyncClipboard.clipboardItem` in `about:config` to enable image copying. Track [Bug 1809106](https://bugzilla.mozilla.org/show_bug.cgi?id=1809106) for updates. | ||
© [silverwind](https://github.com/silverwind), distributed under BSD licence |
3058
39