ClipboardJS: Removed PhantomJS Dependency

Added karma-chrome-launcher dependency

Signed-off-by: ossdev <ossdev@puresoftware.com>
This commit is contained in:
ossdev
2019-03-26 16:26:08 +05:30
committed by Zeno Rocha
parent ce79f170aa
commit 83824fa248
5 changed files with 1394 additions and 1792 deletions

View File

@ -137,7 +137,7 @@ class ClipboardAction {
if (this.trigger) {
this.trigger.focus();
}
document.activeElement.blur();
window.getSelection().removeAllRanges();
}

View File

@ -86,10 +86,10 @@ class Clipboard extends Emitter {
*/
static isSupported(action = ['copy', 'cut']) {
const actions = (typeof action === 'string') ? [action] : action;
let support = !!document.queryCommandSupported;
let support = !document.queryCommandSupported;
actions.forEach((action) => {
support = support && !!document.queryCommandSupported(action);
support = support && !document.queryCommandSupported(action);
});
return support;