From 3105082f7df647cca14062eef340d4158574b163 Mon Sep 17 00:00:00 2001 From: Dylan Hardison Date: Tue, 19 Jul 2016 17:49:01 -0400 Subject: Bug 1275595 - document.execCommand('cut'/'copy') was denied because it was not called from inside a short running user-generated event handler. --- extensions/BugModal/web/bug_modal.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'extensions') diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js index e7a182580..dfbe06bad 100644 --- a/extensions/BugModal/web/bug_modal.js +++ b/extensions/BugModal/web/bug_modal.js @@ -255,14 +255,9 @@ $(function() { } if ($('#copy-summary').length) { - - // probe for document.execCommand("copy") support var hasExecCopy = false; try { - // on page load nothing will be selected, so we don't smash the - // clipboard doing this - document.execCommand("copy"); - hasExecCopy = true; + hasExecCopy = document.queryCommandSupported("copy"); } catch(ex) { // ignore } -- cgit v1.2.3-24-g4f1b