]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1275595 - document.execCommand('cut'/'copy') was denied because it was not called...
authorDylan Hardison <dylan@mozilla.com>
Tue, 19 Jul 2016 21:49:01 +0000 (17:49 -0400)
committerDylan Hardison <dylan@mozilla.com>
Tue, 19 Jul 2016 21:49:10 +0000 (17:49 -0400)
extensions/BugModal/web/bug_modal.js

index e7a182580d80b3e9802e889c67d3c42a8307b5bc..dfbe06bad5ca62e6c8d0807305cc83c144c18ef2 100644 (file)
@@ -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
         }