Skip to content

Commit

Permalink
fix(slides): simulate touch events for query params
Browse files Browse the repository at this point in the history
Slide fail to swipe when platform via query params.
This lets touch events be simulated is ionicPlatform is set.
Closes #10577
  • Loading branch information
mhartington committed Feb 27, 2017
1 parent 2c2b87b commit 97102c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/slides/swiper/swiper-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ export function initEvents(s: Slides, plt: Platform): Function {
}, { passive: true, zone: false }, unregs);
}

if ((s.simulateTouch && !plt.is('ios') && !plt.is('android')) || (s.simulateTouch && !s._supportTouch && plt.is('ios'))) {
if ((s.simulateTouch && !plt.is('ios') && !plt.is('android')) || (s.simulateTouch && !s._supportTouch && plt.is('ios')) || plt.getQueryParam('ionicPlatform')) {
// mousedown
plt.registerListener(touchEventsTarget, 'mousedown', (ev: SlideUIEvent) => {
console.log('mousedown')
onTouchStart(s, plt, ev);
}, { zone: false }, unregs);

Expand Down

0 comments on commit 97102c6

Please sign in to comment.