Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
fix(swipe): Set image draggable attribute to false
Browse files Browse the repository at this point in the history
  • Loading branch information
Wikiki committed Feb 10, 2018
1 parent c66e1b4 commit 4262599
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 4262599

Please sign in to comment.