popovers.js: Fix keyboard shortcuts with copying link.

Fixes #5374.
This commit is contained in:
Cory Lynch 2017-06-20 00:25:20 -04:00 committed by showell
parent d5bcfc415d
commit 387f37c15e
1 changed files with 6 additions and 0 deletions

View File

@ -544,6 +544,12 @@ exports.register_click_handlers = function () {
row.find(".alert-copied").css("display", "block");
row.find(".alert-copied").delay(1000).fadeOut(300);
setTimeout(function () {
// The Cliboard library works by focusing to a hidden textarea.
// We unfocus this so keyboard shortcuts, etc., will work again.
$(":focus").blur();
}, 0);
e.stopPropagation();
e.preventDefault();
});