diff --git a/dist/vue-clickaway.common.js b/dist/vue-clickaway.common.js index d1d4614..4825d0e 100644 --- a/dist/vue-clickaway.common.js +++ b/dist/vue-clickaway.common.js @@ -44,12 +44,12 @@ function bind(el, binding) { }, 0); el[HANDLER] = function(ev) { - // @NOTE: this test used to be `el.containts`, but working with path is better, + // @NOTE: this test used to be just `el.containts`, but working with path is better, // because it tests whether the element was there at the time of // the click, not whether it is there now, that the event has arrived // to the top. // @NOTE: `.path` is non-standard, the standard way is `.composedPath()` - let path = ev.path || (ev.composedPath ? ev.composedPath() : undefined); + var path = ev.path || (ev.composedPath ? ev.composedPath() : undefined); if (initialMacrotaskEnded && (path ? path.indexOf(el) < 0 : !el.contains(ev.target))) { return callback(ev); } diff --git a/dist/vue-clickaway.js b/dist/vue-clickaway.js index e2150f8..3924040 100644 --- a/dist/vue-clickaway.js +++ b/dist/vue-clickaway.js @@ -43,12 +43,12 @@ }, 0); el[HANDLER] = function(ev) { - // @NOTE: this test used to be `el.containts`, but working with path is better, + // @NOTE: this test used to be just `el.containts`, but working with path is better, // because it tests whether the element was there at the time of // the click, not whether it is there now, that the event has arrived // to the top. // @NOTE: `.path` is non-standard, the standard way is `.composedPath()` - let path = ev.path || (ev.composedPath ? ev.composedPath() : undefined); + var path = ev.path || (ev.composedPath ? ev.composedPath() : undefined); if (initialMacrotaskEnded && (path ? path.indexOf(el) < 0 : !el.contains(ev.target))) { return callback(ev); } diff --git a/dist/vue-clickaway.min.js b/dist/vue-clickaway.min.js index 37df1d9..e4e847e 100644 --- a/dist/vue-clickaway.min.js +++ b/dist/vue-clickaway.min.js @@ -1 +1 @@ -!function(e,n){"use strict";function t(e,n){i(e);var t=n.value;if("function"==typeof t){var o=!1;setTimeout(function(){o=!0},0),e[u]=function(n){if(o&&n.path.indexOf(e)<0)return t(n)},document.documentElement.addEventListener("click",e[u],!1)}}function i(e){document.documentElement.removeEventListener("click",e[u],!1),delete e[u]}n="default"in n?n.default:n;/^2\./.test(n.version)||n.util.warn("VueClickaway 2.2.0 only supports Vue 2.x, and does not support Vue "+n.version);var u="_vue_clickaway_handler",o={bind:t,update:function(e,n){n.value!==n.oldValue&&t(e,n)},unbind:i},c={directives:{onClickaway:o}};e.version="2.2.0",e.directive=o,e.mixin=c}(this.VueClickaway={},Vue); \ No newline at end of file +!function(e,n){"use strict";function t(e,n){i(e);var t=n.value;if("function"==typeof t){var u=!1;setTimeout(function(){u=!0},0),e[o]=function(n){var i=n.path||(n.composedPath?n.composedPath():void 0);if(u&&(i?i.indexOf(e)<0:!e.contains(n.target)))return t(n)},document.documentElement.addEventListener("click",e[o],!1)}}function i(e){document.documentElement.removeEventListener("click",e[o],!1),delete e[o]}n="default"in n?n.default:n;/^2\./.test(n.version)||n.util.warn("VueClickaway 2.2.1 only supports Vue 2.x, and does not support Vue "+n.version);var o="_vue_clickaway_handler",u={bind:t,update:function(e,n){n.value!==n.oldValue&&t(e,n)},unbind:i},a={directives:{onClickaway:u}};e.version="2.2.1",e.directive=u,e.mixin=a}(this.VueClickaway={},Vue); \ No newline at end of file