diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 618b23e75..55b1c2799 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -149,14 +149,14 @@ Cypress.Commands.add('injectStyles', { prevSubject: 'optional' }, (subject, cssS }); Cypress.Commands.add('swipeLeft', () => { - cy.getSliderContainer() + cy.getSliderWrapper() .trigger('pointerdown', { which: 1, pageX: 100, pageY: 100, force: true }) .trigger('pointermove', { pageX: 50, pageY: 100, force: true }) .trigger('pointerup', { force: true }); }); Cypress.Commands.add('swipeRight', () => { - cy.getSliderContainer() + cy.getSliderWrapper() .trigger('pointerdown', { which: 1, pageX: -100, pageY: 100, force: true }) .trigger('pointermove', { pageX: 50, pageY: 100, force: true }) .trigger('pointerup', { force: true }); diff --git a/src/core/defaults.js b/src/core/defaults.js index 649cce9aa..19be788c1 100644 --- a/src/core/defaults.js +++ b/src/core/defaults.js @@ -1,7 +1,7 @@ export default { init: true, direction: 'horizontal', - touchEventsTarget: 'container', + touchEventsTarget: 'wrapper', initialSlide: 0, speed: 300, cssMode: false, diff --git a/src/types/swiper-options.d.ts b/src/types/swiper-options.d.ts index 1fcad96c6..5fb0a4f9b 100644 --- a/src/types/swiper-options.d.ts +++ b/src/types/swiper-options.d.ts @@ -346,7 +346,7 @@ export interface SwiperOptions { * Target element to listen touch events on. Can be `'container'` (to listen for touch events on swiper-container) or `'wrapper'` * (to listen for touch events on swiper-wrapper) * - * @default 'container' + * @default 'wrapper' */ touchEventsTarget?: 'container' | 'wrapper';