We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0143b7c commit 0b40a63Copy full SHA for 0b40a63
src/DebugBar/Resources/widgets/sqlqueries/widget.js
@@ -20,11 +20,12 @@
20
var code = $(el).parent('li').find('code').get(0);
21
var copy = function () {
22
try {
23
- document.execCommand('copy');
24
- $(el).addClass(csscls('copy-clipboard-check'));
25
- setTimeout(function(){
26
- $(el).removeClass(csscls('copy-clipboard-check'));
27
- }, 2000)
+ if (document.execCommand('copy')) {
+ $(el).addClass(csscls('copy-clipboard-check'));
+ setTimeout(function(){
+ $(el).removeClass(csscls('copy-clipboard-check'));
+ }, 2000)
28
+ }
29
} catch (err) {
30
console.log('Oops, unable to copy');
31
}
0 commit comments