diff --git a/bower.json b/bower.json index f699e2d..63d834c 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "clipboard", - "version": "2.0.5", + "version": "2.0.6", "description": "Modern copy to clipboard. No Flash. Just 3kb", "license": "MIT", "main": "dist/clipboard.js", diff --git a/dist/clipboard.js b/dist/clipboard.js index e43d167..0240e3f 100644 --- a/dist/clipboard.js +++ b/dist/clipboard.js @@ -1,5 +1,5 @@ /*! - * clipboard.js v2.0.5 + * clipboard.js v2.0.6 * https://clipboardjs.com/ * * Licensed MIT © Zeno Rocha @@ -936,10 +936,10 @@ var clipboard_Clipboard = function (_Emitter) { var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut']; var actions = typeof action === 'string' ? [action] : action; - var support = !document.queryCommandSupported; + var support = !!document.queryCommandSupported; actions.forEach(function (action) { - support = support && !document.queryCommandSupported(action); + support = support && !!document.queryCommandSupported(action); }); return support; diff --git a/dist/clipboard.min.js b/dist/clipboard.min.js index da5b6a2..28650f3 100644 --- a/dist/clipboard.min.js +++ b/dist/clipboard.min.js @@ -1,7 +1,7 @@ /*! - * clipboard.js v2.0.5 + * clipboard.js v2.0.6 * https://clipboardjs.com/ * * Licensed MIT © Zeno Rocha */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return o={},r.m=n=[function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o