From 42625998af056a78026d9f7c1766970d9399206c Mon Sep 17 00:00:00 2001 From: Wikiki Date: Sat, 10 Feb 2018 10:38:35 +0100 Subject: [PATCH] fix(swipe): Set image draggable attribute to false --- src/extension.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/extension.js b/src/extension.js index fdee683..e990707 100644 --- a/src/extension.js +++ b/src/extension.js @@ -19,6 +19,10 @@ export default class Carousel { */ init() { this.items = Array.from(this.element.querySelectorAll('.carousel-item')); + this.items.forEach((item) => { + let img = item.querySelector('img'); + img.setAttribute('draggable', false); + }); this.computedStyle = window.getComputedStyle(this.element); this.previousControl = this.element.querySelector('.carousel-nav-left');