From 07b4a631d0f3c300ff30ce7edd068af48f061592 Mon Sep 17 00:00:00 2001 From: NaotoshiFujita Date: Mon, 25 Nov 2019 13:49:42 +0900 Subject: [PATCH] Prevent propagation of a click event during drag/swipe(#6). --- dist/js/splide.js | 107 +++++++++++++------------------ dist/js/splide.min.js | 4 +- dist/js/splide.min.js.gz | Bin 9481 -> 9466 bytes package.json | 2 +- src/js/components/click/index.js | 68 ++++++++++++++++++++ src/js/components/drag/index.js | 8 +-- src/js/components/index.js | 4 +- src/js/components/links/index.js | 82 ----------------------- src/js/components/sync/index.js | 2 +- src/js/utils/dom.js | 6 +- 10 files changed, 127 insertions(+), 156 deletions(-) create mode 100644 src/js/components/click/index.js delete mode 100644 src/js/components/links/index.js diff --git a/dist/js/splide.js b/dist/js/splide.js index b6e42d34..7f39059c 100644 --- a/dist/js/splide.js +++ b/dist/js/splide.js @@ -1,6 +1,6 @@ /*! * Splide.js - * Version : 1.2.4 + * Version : 1.2.5 * License : MIT * Copyright: 2019 Naotoshi Fujita */ @@ -860,21 +860,19 @@ function removeAttribute(elm, name) { * @param {Element|Window} elm - An element or window object. * @param {string} event - An event name or event names separated with space. * @param {function} handler - Callback function. - * @param {boolean} passive - Optional. Set false if the event is not passive. + * @param {Object} options - Optional. Options. * * @return {function[]} - Functions to stop subscription. */ -function subscribe(elm, event, handler, passive) { - if (passive === void 0) { - passive = true; +function subscribe(elm, event, handler, options) { + if (options === void 0) { + options = {}; } if (elm) { return event.split(' ').map(function (e) { - elm.addEventListener(e, handler, { - passive: passive - }); + elm.addEventListener(e, handler, options); return function () { return elm.removeEventListener(e, handler); }; @@ -3580,13 +3578,17 @@ var SWIPE_THRESHOLD = 150; mount: function mount() { var list = Components.Elements.list; subscribe(list, 'touchstart mousedown', start); - subscribe(list, 'touchmove mousemove', move, false); - subscribe(list, 'touchend touchcancel mouseleave mouseup dragend', end); // Prevent dragging an image itself. + subscribe(list, 'touchmove mousemove', move, { + passive: false + }); + subscribe(list, 'touchend touchcancel mouseleave mouseup dragend', end); // Prevent dragging an image or anchor itself. - each(list.getElementsByTagName('img'), function (img) { - subscribe(img, 'dragstart', function (e) { + each(list.querySelectorAll('img, a'), function (elm) { + subscribe(elm, 'dragstart', function (e) { e.preventDefault(); - }, false); + }, { + passive: false + }); }); } }; @@ -3784,25 +3786,18 @@ var SWIPE_THRESHOLD = 150; return Drag; }); -// CONCATENATED MODULE: ./src/js/components/links/index.js +// CONCATENATED MODULE: ./src/js/components/click/index.js /** - * The component for disabling a link while a slider is dragged. + * The component for handling a click event. * * @author Naotoshi Fujita * @copyright Naotoshi Fujita. All rights reserved. */ - -/** - * The name for a data attribute. - * - * @type {string} - */ - -var HREF_DATA_NAME = 'data-splide-href'; /** - * The component for disabling a link while a slider is dragged. + * The component for handling a click event. + * Click should be disabled during drag/swipe. * * @param {Splide} Splide - A Splide instance. * @param {Object} Components - An object containing components. @@ -3810,20 +3805,20 @@ var HREF_DATA_NAME = 'data-splide-href'; * @return {Object} - The component object. */ -/* harmony default export */ var components_links = (function (Splide, Components) { +/* harmony default export */ var components_click = (function (Splide, Components) { /** - * Hold all anchor elements under the list. + * Whether click is disabled or not. * - * @type {Array} + * @type {boolean} */ - var links = []; + var disabled = false; /** - * Links component object. + * Click component object. * * @type {Object} */ - var Links = { + var Click = { /** * Mount only when the drag is activated and the slide type is not "fade". * @@ -3835,43 +3830,31 @@ var HREF_DATA_NAME = 'data-splide-href'; * Called when the component is mounted. */ mount: function mount() { - links = values(Components.Elements.list.getElementsByTagName('a')); - links.forEach(function (link) { - setAttribute(link, HREF_DATA_NAME, getAttribute(link, 'href')); + subscribe(Components.Elements.track, 'click', click, { + capture: true + }); + Splide.on('drag', function () { + disabled = true; + }).on('moved', function () { + disabled = false; }); - bind(); } }; /** - * Listen some events. - */ - - function bind() { - Splide.on('drag', disable); - Splide.on('moved', enable); - } - /** - * Disable links by removing href attributes. - */ - - - function disable() { - links.forEach(function (link) { - return removeAttribute(link, 'href'); - }); - } - /** - * Enable links by restoring href attributes. + * Called when a track element is clicked. + * + * @param {Event} e - A click event. */ - - function enable() { - links.forEach(function (link) { - return setAttribute(link, 'href', getAttribute(link, HREF_DATA_NAME)); - }); + function click(e) { + if (disabled) { + e.preventDefault(); + e.stopPropagation(); + e.stopImmediatePropagation(); + } } - return Links; + return Click; }); // CONCATENATED MODULE: ./src/js/components/autoplay/index.js /** @@ -5165,7 +5148,9 @@ var TRIGGER_KEYS = [' ', 'Enter', 'Spacebar']; e.preventDefault(); moveSibling(Slide.index); } - }, false); + }, { + passive: false + }); }); } @@ -5322,7 +5307,7 @@ var COMPLETE = { Clones: components_clones, Layout: layout, Drag: drag, - Links: components_links, + Click: components_click, Autoplay: components_autoplay, Cover: components_cover, Arrows: components_arrows, diff --git a/dist/js/splide.min.js b/dist/js/splide.min.js index 7bdbba82..f315c7cd 100644 --- a/dist/js/splide.min.js +++ b/dist/js/splide.min.js @@ -1,6 +1,6 @@ /*! * Splide.js - * Version : 1.2.4 + * Version : 1.2.5 * License : MIT * Copyright: 2019 Naotoshi Fujita - */!function(i){var e={};function o(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return i[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=i,o.c=e,o.d=function(t,n,i){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:i})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(n,t){if(1&t&&(n=o(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)o.d(i,e,function(t){return n[t]}.bind(null,e));return i},o.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(n,"a",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p="",o(o.s=0)}([function(t,n,i){"use strict";function e(){return(e=Object.assign||function(t){for(var n=1;n])(\d+)?/),e=i&&i[1]||"",o=i?parseInt(i[2]):0;switch(e){case"+":n+=o||1;break;case"-":n-=o||1;break;case">":n=this.pageToIndex(-1o.flickThreshold&&Math.abs(t.offset[f])<150&&(a+=r*Math.min(i*o.flickPower,e.width*(o.flickMaxPages||1)));var s=c.toIndex(a);s===u.index&&(s+=l.isRtl()?r:-r),u.is(k)||(s=T(s,0,l.edgeIndex)),l.go(s,o.isNavigation)}}(o),r=!1)}function g(t,n){var i=t.timeStamp,e=t.touches,o=e?e[0]:t,r=o.clientX,a=o.clientY,s=n.to||{},u=s.x,d=void 0===u?r:u,c=s.y,l=void 0===c?a:c,f={x:r-d,y:a-l},p=i-(n.timeStamp||0);return{from:{x:d,y:l},to:{x:r,y:a},offset:f,timeStamp:i,velocity:{x:f.x/p,y:f.y/p}}}return n}function F(o,r,a){var s,i=[],u={required:o.options.autoplay,mount:function(){var t=o.options,n=r.Elements,i=n.slides,e=n.bar;i.length>t.perPage&&(s=function(n,i,e){function o(t){d||(s=(a=t-(r=r||t))/i,i<=a&&(r=0,s=1,n()),e&&e(s),u(o))}var r,a,s,u=window.requestAnimationFrame,d=!0;return{pause:function(){d=!0,r=0},play:function(){r=0,d&&(d=!1,u(o))}}}(function(){o.go(">")},t.interval,function(t){o.emit(a+":playing",t),e&&h(e,{width:100*t+"%"})}),function(){var t=o.options,n=r.Elements,i=o.sub,e=[o.root,i?i.root:null];t.pauseOnHover&&(d(e,"mouseleave",K,!0),d(e,"mouseenter",K,!1));t.pauseOnFocus&&(d(e,"focusout",Q,!0),d(e,"focusin",Q,!1));w(n.play,"click",function(){u.play(Q),u.play(Z)}),d([n.pause],"click",Z,!1),o.on("move",function(){u.play()})}(),this.play())},play:function(n){void 0===n&&(n=0),(i=i.filter(function(t){return t!==n})).length||(o.emit(a+":play"),s.play())},pause:function(t){void 0===t&&(t=0),s.pause(),-1===i.indexOf(t)&&i.push(t),1===i.length&&o.emit(a+":pause")}};function d(t,n,i,e){for(var o in t)w(t[o],n,function(){u[e?"play":"pause"](i)})}return u}function G(s,u,d){var c,o=s.classes,r=s.root;function a(t){var n=p("button",{class:o.arrow+" "+(t?o.prev:o.next)});return n.innerHTML='',n}return{required:s.options.arrows,mount:function(){var t=u.Elements,n=s.options.arrows;if((!(c=t.arrows).prev||!c.next)&&n){c=function(){var t=p("div",{class:o.arrows}),n=a(!0),i=a(!1);return t.appendChild(n),t.appendChild(i),{wrapper:t,prev:n,next:i}}();var i=t.slider,e="slider"===n&&i?i:r;e.insertBefore(c.wrapper,e.firstChild)}c&&(function(){var t=s.options.perMove;w(c.prev,"click",function(){s.go(t?"-"+t:"<")}),w(c.next,"click",function(){s.go(t?"+"+t:">")})}(),s.on("mounted move updated",function(){var t=c,n=t.prev,i=t.next,e=u.Controller,o=e.prevIndex,r=e.nextIndex,a=1"+n)}),{li:i,button:e,page:n,Slides:a.getSlidesByPage(n)}});return{list:r,items:t}}();var t=i.Elements.slider;(n="slider"===s.options.pagination&&t?t:s.root).appendChild(r.list),s.on($,e).on("updated.page",function(){a.destroy(),s.options.pagination&&(a.mount(),a.mounted())})},mounted:function(){var t=s.index;s.emit(o+":mounted",r,this.getItem(t)),e(t,-1)},destroy:function(){r&&r.list&&n.removeChild(r.list),s.off($),r=null},getItem:function(t){return r.items[i.Controller.indexToPage(t)]},get data(){return r}};function e(t,n){var i=a.getItem(n),e=a.getItem(t);i&&m(i.button,l.active),e&&g(e.button,l.active),s.emit(o+":updated",r,i,e)}return a}function J(s,e){var u=s.i18n;function n(t,n){y(t,"aria-hidden",!n),y(t,"tabindex",n?0:-1)}function t(t,n){var i=e.Elements.track.id;y(t,et,i),y(n,et,i)}function i(t,n,i,e){var o=s.index,r=-1",Left:"<",Right:">"},vertical:{ArrowUp:"<",ArrowDown:">",Up:"<",Down:">"}},it="aria-current",et="aria-controls",ot="aria-label",rt="move.sync",at=[" ","Enter","Spacebar"],st={Options:L,Elements:O,Controller:z,Slides:R,Track:B,Clones:D,Layout:V,Drag:X,Links:function(t,n){var i=[];function e(){i.forEach(function(t){return b(t,"href")})}function o(){i.forEach(function(t){return y(t,"href",x(t,Y))})}return{required:t.options.drag&&!t.is(P),mount:function(){(i=s(n.Elements.list.getElementsByTagName("a"))).forEach(function(t){y(t,Y,x(t,"href"))}),t.on("drag",e),t.on("moved",o)}}},Autoplay:F,Cover:function(t,n){var i=t.options;function e(t){var n=t.parentElement;n&&(h(n,{background:'center/cover no-repeat url("'+t.src+'")'}),h(t,{display:"none"}))}return{required:i.cover&&(i.height||i.heightRatio||i.fixedHeight),mount:function(){n.Slides.getSlides(!0,!1).forEach(function(t){var n=f(t,"img");n&&n.src&&e(n)}),t.on("lazyload:loaded",function(t){e(t)})}}},Arrows:G,Pagination:U,LazyLoad:function(o,t,r){var n=0,e=[],i=o.options.lazyLoad,a="sequential"===i;function s(n){var i=o.options;(e=e.filter(function(t){return!t.Slide.isWithin(n,i.perPage*(i.preloadPages+1))||(u(t.img,t.Slide),!1)})).length||o.off("moved."+r)}function u(t,n){g(n.slide,l.loading);var i=p("span",{class:o.classes.spinner});t.parentElement.appendChild(i),t.onload=function(){c(t,i,n,!1)},t.onerror=function(){c(t,i,n,!0)},y(t,"src",x(t,tt))}function d(){if(n])(\d+)?/),e=i&&i[1]||"",o=i?parseInt(i[2]):0;switch(e){case"+":n+=o||1;break;case"-":n-=o||1;break;case">":n=this.pageToIndex(-1o.flickThreshold&&Math.abs(t.offset[f])<150&&(a+=r*Math.min(i*o.flickPower,e.width*(o.flickMaxPages||1)));var s=c.toIndex(a);s===u.index&&(s+=l.isRtl()?r:-r),u.is(k)||(s=A(s,0,l.edgeIndex)),l.go(s,o.isNavigation)}}(o),r=!1)}function g(t,n){var i=t.timeStamp,e=t.touches,o=e?e[0]:t,r=o.clientX,a=o.clientY,s=n.to||{},u=s.x,d=void 0===u?r:u,c=s.y,l=void 0===c?a:c,f={x:r-d,y:a-l},p=i-(n.timeStamp||0);return{from:{x:d,y:l},to:{x:r,y:a},offset:f,timeStamp:i,velocity:{x:f.x/p,y:f.y/p}}}return n}function F(o,r,a){var s,i=[],u={required:o.options.autoplay,mount:function(){var t=o.options,n=r.Elements,i=n.slides,e=n.bar;i.length>t.perPage&&(s=function(n,i,e){function o(t){d||(s=(a=t-(r=r||t))/i,i<=a&&(r=0,s=1,n()),e&&e(s),u(o))}var r,a,s,u=window.requestAnimationFrame,d=!0;return{pause:function(){d=!0,r=0},play:function(){r=0,d&&(d=!1,u(o))}}}(function(){o.go(">")},t.interval,function(t){o.emit(a+":playing",t),e&&h(e,{width:100*t+"%"})}),function(){var t=o.options,n=r.Elements,i=o.sub,e=[o.root,i?i.root:null];t.pauseOnHover&&(d(e,"mouseleave",Y,!0),d(e,"mouseenter",Y,!1));t.pauseOnFocus&&(d(e,"focusout",K,!0),d(e,"focusin",K,!1));w(n.play,"click",function(){u.play(K),u.play(Q)}),d([n.pause],"click",Q,!1),o.on("move",function(){u.play()})}(),this.play())},play:function(n){void 0===n&&(n=0),(i=i.filter(function(t){return t!==n})).length||(o.emit(a+":play"),s.play())},pause:function(t){void 0===t&&(t=0),s.pause(),-1===i.indexOf(t)&&i.push(t),1===i.length&&o.emit(a+":pause")}};function d(t,n,i,e){for(var o in t)w(t[o],n,function(){u[e?"play":"pause"](i)})}return u}function G(s,u,d){var c,o=s.classes,r=s.root;function a(t){var n=p("button",{class:o.arrow+" "+(t?o.prev:o.next)});return n.innerHTML='',n}return{required:s.options.arrows,mount:function(){var t=u.Elements,n=s.options.arrows;if((!(c=t.arrows).prev||!c.next)&&n){c=function(){var t=p("div",{class:o.arrows}),n=a(!0),i=a(!1);return t.appendChild(n),t.appendChild(i),{wrapper:t,prev:n,next:i}}();var i=t.slider,e="slider"===n&&i?i:r;e.insertBefore(c.wrapper,e.firstChild)}c&&(function(){var t=s.options.perMove;w(c.prev,"click",function(){s.go(t?"-"+t:"<")}),w(c.next,"click",function(){s.go(t?"+"+t:">")})}(),s.on("mounted move updated",function(){var t=c,n=t.prev,i=t.next,e=u.Controller,o=e.prevIndex,r=e.nextIndex,a=1"+n)}),{li:i,button:e,page:n,Slides:a.getSlidesByPage(n)}});return{list:r,items:t}}();var t=i.Elements.slider;(n="slider"===s.options.pagination&&t?t:s.root).appendChild(r.list),s.on(Z,e).on("updated.page",function(){a.destroy(),s.options.pagination&&(a.mount(),a.mounted())})},mounted:function(){var t=s.index;s.emit(o+":mounted",r,this.getItem(t)),e(t,-1)},destroy:function(){r&&r.list&&n.removeChild(r.list),s.off(Z),r=null},getItem:function(t){return r.items[i.Controller.indexToPage(t)]},get data(){return r}};function e(t,n){var i=a.getItem(n),e=a.getItem(t);i&&m(i.button,l.active),e&&g(e.button,l.active),s.emit(o+":updated",r,i,e)}return a}function J(s,e){var u=s.i18n;function n(t,n){y(t,"aria-hidden",!n),y(t,"tabindex",n?0:-1)}function t(t,n){var i=e.Elements.track.id;y(t,it,i),y(n,it,i)}function i(t,n,i,e){var o=s.index,r=-1",Left:"<",Right:">"},vertical:{ArrowUp:"<",ArrowDown:">",Up:"<",Down:">"}},nt="aria-current",it="aria-controls",et="aria-label",ot="move.sync",rt=[" ","Enter","Spacebar"],at={Options:O,Elements:W,Controller:z,Slides:N,Track:D,Clones:B,Layout:V,Drag:X,Click:function(t,n){var i=!1;function e(t){i&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}return{required:t.options.drag&&!t.is(P),mount:function(){w(n.Elements.track,"click",e,{capture:!0}),t.on("drag",function(){i=!0}).on("moved",function(){i=!1})}}},Autoplay:F,Cover:function(t,n){var i=t.options;function e(t){var n=t.parentElement;n&&(h(n,{background:'center/cover no-repeat url("'+t.src+'")'}),h(t,{display:"none"}))}return{required:i.cover&&(i.height||i.heightRatio||i.fixedHeight),mount:function(){n.Slides.getSlides(!0,!1).forEach(function(t){var n=f(t,"img");n&&n.src&&e(n)}),t.on("lazyload:loaded",function(t){e(t)})}}},Arrows:G,Pagination:U,LazyLoad:function(o,t,r){var n=0,e=[],i=o.options.lazyLoad,a="sequential"===i;function s(n){var i=o.options;(e=e.filter(function(t){return!t.Slide.isWithin(n,i.perPage*(i.preloadPages+1))||(u(t.img,t.Slide),!1)})).length||o.off("moved."+r)}function u(t,n){g(n.slide,l.loading);var i=p("span",{class:o.classes.spinner});t.parentElement.appendChild(i),t.onload=function(){c(t,i,n,!1)},t.onerror=function(){c(t,i,n,!0)},y(t,"src",x(t,$))}function d(){if(n|trVab7b%ch(w7%CRY?zX6UJm2jnwy-B-mF&ba=9lU!skmyYvWLG@{$VRCRZp->nPXAD z6PaS`>}i6R^mvNaS?9Y8=PpF(g?Q^V+Buy3Nc28x$kN>59 zCf^CqQsicF^NJUW$7Qo#Cpa7c3{d36(glm4q-fSE>Ox%aqJ&*Pr3KXl7Z2nzS;{IV z%taB(t$^5Ylj%)S|8Q4YU}-AA4mid(k0K@kx^+HE_VHyG z$D;-)8es;9=*g111;*SSSW(wvRX#j~Ah4h<^YNsd7S#$)rc`yh=H*J=Ov=GPgGuDB z?y|g^v`$1MAGIMkvIMYEUGl43z#qxpK`=>+?RE_aej{q;CQ9~hJGaz(XXg2p-`9X@ zX)QNAJ_=zTBRgRP!(f;?J~#v#t4z{Ov5ik5R4{_{bqAEAe6vcgMnjIryFC!3Llanf zzmFu@@81H#v^Rhg%wlK*UDux zHBPiDw%D{-(DFur8;7AC8(q51ws&o*M~;`jU4uzl>ftvEsgmsrCZc~KL9=FPR353l*}f>&|+{3%O6 zeZkVF|C^9v_J7{`^FZ$vS>8u$qi+=|jeOMgJAEvSI-#Q4u; zwj+o{Z{SZMo4RMfO#q3$hd*t}QdDq8(O+aw$sT>!8aQ!Rfxm4z{q?i0p|9R2wT7H4 z#t&VJTZ-NyY4(DR(#E1U_?Iu<2b$rs#gReEmNS+9*6`~7EnfqIg9s^8WL7GUdQoyY zx=Jz>+MbIp^a!9^D9cOh7!;2iv0hXhI9^8#Q5#9Z1r?HcELnF3tINo}l|Jn$w;|(R z0AoN&WK^B6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X|BVL4Y4Ef zM?HkHl={+z`o&?Wf1bD_85Dtbzk)-&^QM%s(zts|23DZZGk#0~405KXlvcbi zqYqv)G0b0sPP)c-;!V~%{-+i&-e8{XjI0xCe{>ukkHdT8)ZK9e$=o12SFYbHU%rBJw3i+&P>QA&ry$yw=bNjT3^>51B;Y5)$~ zZMQR+T~&CWjL=M%st@uOSQySHSsZiSXde(cs^N2UnoXzo#b4QH(PQ3y5Kz_(fWc8v z^ui;nqpQ^+RyrKggAw2GrKpZMD&x2D6~41y>*Me2N4KrV(OuO8Kcc@RLCXS?y8U%i zgf*l|dRx64oA@CJG;@awoq6=a(qVG;>4frdBmRAtL}7aKW(IHQny8NkfHiHFIG&=z z5Cdlz^!30k6+J~K&=qkCuOi?AFt`VKME_lgSN2{07}7RWrEQ8<8*N1N-wTY=-pqd> z0o(fn=5b!Do^=-9IqLtXJ3mn8}L0?UAOogAnY@z=g+lz^QM%0dLs$n b+xbUkpZCno&Pv$ERW|!?h|aKVjb;D { + /** + * Whether click is disabled or not. + * + * @type {boolean} + */ + let disabled = false; + + /** + * Click component object. + * + * @type {Object} + */ + const Click = { + /** + * Mount only when the drag is activated and the slide type is not "fade". + * + * @type {boolean} + */ + required: Splide.options.drag && ! Splide.is( FADE ), + + /** + * Called when the component is mounted. + */ + mount() { + subscribe( Components.Elements.track, 'click', click, { capture: true } ); + + Splide + .on( 'drag', () => { disabled = true } ) + .on( 'moved', () => { disabled = false } ); + }, + }; + + /** + * Called when a track element is clicked. + * + * @param {Event} e - A click event. + */ + function click( e ) { + if ( disabled ) { + e.preventDefault(); + e.stopPropagation(); + e.stopImmediatePropagation(); + } + } + + return Click; +} \ No newline at end of file diff --git a/src/js/components/drag/index.js b/src/js/components/drag/index.js index cec99160..2708e45c 100644 --- a/src/js/components/drag/index.js +++ b/src/js/components/drag/index.js @@ -129,12 +129,12 @@ export default ( Splide, Components ) => { const list = Components.Elements.list; subscribe( list, 'touchstart mousedown', start ); - subscribe( list, 'touchmove mousemove', move, false ); + subscribe( list, 'touchmove mousemove', move, { passive: false } ); subscribe( list, 'touchend touchcancel mouseleave mouseup dragend', end ); - // Prevent dragging an image itself. - each( list.getElementsByTagName( 'img' ), img => { - subscribe( img, 'dragstart', e => { e.preventDefault() }, false ); + // Prevent dragging an image or anchor itself. + each( list.querySelectorAll( 'img, a' ), elm => { + subscribe( elm, 'dragstart', e => { e.preventDefault() }, { passive: false } ); } ); }, }; diff --git a/src/js/components/index.js b/src/js/components/index.js index e9115026..56d49618 100644 --- a/src/js/components/index.js +++ b/src/js/components/index.js @@ -13,7 +13,7 @@ import Track from './track'; import Clones from './clones'; import Layout from './layout'; import Drag from './drag'; -import Links from './links'; +import Click from './click'; import Autoplay from './autoplay'; import Cover from './cover'; import Arrows from './arrows'; @@ -33,7 +33,7 @@ export const COMPLETE = { Clones, Layout, Drag, - Links, + Click, Autoplay, Cover, Arrows, diff --git a/src/js/components/links/index.js b/src/js/components/links/index.js deleted file mode 100644 index d0bfbea8..00000000 --- a/src/js/components/links/index.js +++ /dev/null @@ -1,82 +0,0 @@ -/** - * The component for disabling a link while a slider is dragged. - * - * @author Naotoshi Fujita - * @copyright Naotoshi Fujita. All rights reserved. - */ - -import { values } from "../../utils/object"; -import { removeAttribute, setAttribute, getAttribute } from "../../utils/dom"; -import { FADE } from "../../constants/types"; - -/** - * The name for a data attribute. - * - * @type {string} - */ -const HREF_DATA_NAME = 'data-splide-href'; - - -/** - * The component for disabling a link while a slider is dragged. - * - * @param {Splide} Splide - A Splide instance. - * @param {Object} Components - An object containing components. - * - * @return {Object} - The component object. - */ -export default ( Splide, Components ) => { - /** - * Hold all anchor elements under the list. - * - * @type {Array} - */ - let links = []; - - /** - * Links component object. - * - * @type {Object} - */ - const Links = { - /** - * Mount only when the drag is activated and the slide type is not "fade". - * - * @type {boolean} - */ - required: Splide.options.drag && ! Splide.is( FADE ), - - /** - * Called when the component is mounted. - */ - mount() { - links = values( Components.Elements.list.getElementsByTagName( 'a' ) ); - links.forEach( link => { setAttribute( link, HREF_DATA_NAME, getAttribute( link, 'href' ) ) } ); - bind(); - }, - }; - - /** - * Listen some events. - */ - function bind() { - Splide.on( 'drag', disable ); - Splide.on( 'moved', enable ); - } - - /** - * Disable links by removing href attributes. - */ - function disable() { - links.forEach( link => removeAttribute( link, 'href' ) ); - } - - /** - * Enable links by restoring href attributes. - */ - function enable() { - links.forEach( link => setAttribute( link, 'href', getAttribute( link, HREF_DATA_NAME ) ) ); - } - - return Links; -} \ No newline at end of file diff --git a/src/js/components/sync/index.js b/src/js/components/sync/index.js index 7f772455..6c4e4ce3 100644 --- a/src/js/components/sync/index.js +++ b/src/js/components/sync/index.js @@ -138,7 +138,7 @@ export default ( Splide ) => { e.preventDefault(); moveSibling( Slide.index ); } - }, false ); + }, { passive: false } ); } ); } diff --git a/src/js/utils/dom.js b/src/js/utils/dom.js index 6759f904..9d7f8e90 100644 --- a/src/js/utils/dom.js +++ b/src/js/utils/dom.js @@ -160,14 +160,14 @@ export function removeAttribute( elm, name ) { * @param {Element|Window} elm - An element or window object. * @param {string} event - An event name or event names separated with space. * @param {function} handler - Callback function. - * @param {boolean} passive - Optional. Set false if the event is not passive. + * @param {Object} options - Optional. Options. * * @return {function[]} - Functions to stop subscription. */ -export function subscribe( elm, event, handler, passive = true ) { +export function subscribe( elm, event, handler, options = {} ) { if ( elm ) { return event.split( ' ' ).map( e => { - elm.addEventListener( e, handler, { passive } ); + elm.addEventListener( e, handler, options ); return () => elm.removeEventListener( e, handler ); } ); }