Skip to content

Commit

Permalink
fix(core): grab cursor to be set based on touchEventsTarget
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Aug 4, 2021
1 parent 287d14a commit cffc3aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Swiper {
swiper.modules.forEach((mod) => {
mod({
swiper,
extendParams: moduleExtendParams,
extendParams: moduleExtendParams(params, allModulesParams),
on: swiper.on.bind(swiper),
once: swiper.once.bind(swiper),
off: swiper.off.bind(swiper),
Expand Down
2 changes: 1 addition & 1 deletion src/core/grab-cursor/setGrabCursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function setGrabCursor(moving) {
swiper.params.cssMode
)
return;
const el = swiper.el;
const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;
el.style.cursor = 'move';
el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
Expand Down

0 comments on commit cffc3aa

Please sign in to comment.