Skip to content

Commit

Permalink
fix(slides): simulate touch events for query params (#10579)
Browse files Browse the repository at this point in the history
* fix(slides): simulate touch events for query params
Slide fail to swipe when platform via query params.
This lets touch events be simulated is ionicPlatform is set.
Closes #10577

* style(remove debug log):
  • Loading branch information
mhartington authored and manucorporat committed Mar 15, 2017
1 parent c236a4b commit e191321
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/slides/swiper/swiper-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ 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) => {
onTouchStart(s, plt, ev);
Expand Down

0 comments on commit e191321

Please sign in to comment.