From 8d690838d9576f72749e65c439a16fcb01eebe1a Mon Sep 17 00:00:00 2001 From: "Patrick H. Lauke" Date: Fri, 22 Apr 2022 13:12:56 +0100 Subject: [PATCH] Remove the `blur()` following a clipboard action It's pointless to set `focus()` on the trigger first, if in the next step you're just going to `blur()` the active element anyway. --- src/clipboard.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/clipboard.js b/src/clipboard.js index 34aef60..ee5fe56 100644 --- a/src/clipboard.js +++ b/src/clipboard.js @@ -86,7 +86,6 @@ class Clipboard extends Emitter { if (trigger) { trigger.focus(); } - document.activeElement.blur(); window.getSelection().removeAllRanges(); }, });