Skip to content

Commit

Permalink
Merge pull request nolimits4web#2583 from danijelGombac/patch-1
Browse files Browse the repository at this point in the history
Prevent apply grab cursor when swiper is locked
  • Loading branch information
nolimits4web authored Apr 17, 2018
2 parents 6add670 + 9012c82 commit 228df24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/core/grab-cursor/setGrabCursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Support from '../../../utils/support';

export default function (moving) {
const swiper = this;
if (Support.touch || !swiper.params.simulateTouch) return;
if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked)) return;
const el = swiper.el;
el.style.cursor = 'move';
el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
Expand Down
2 changes: 1 addition & 1 deletion src/components/core/grab-cursor/unsetGrabCursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import Support from '../../../utils/support';

export default function () {
const swiper = this;
if (Support.touch) return;
if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked)) return;
swiper.el.style.cursor = '';
}

0 comments on commit 228df24

Please sign in to comment.