vishalnathbone / html5slides

Automatically exported from code.google.com/p/html5slides
0 stars 0 forks source link

Buggy navigation on mobile devices #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open the slides on iPad
2. swipe left or right

What is the expected output? What do you see instead?
First of all I expect that on mobile devices only one slide should be available 
at time in the viewport, instead there are always 2 slides in the viewport. And 
when you reach the second slide, on swipe event the next slide appears over the 
first slide, so i have to pan back, to see the slide. In the end navigating 
between slides is quite hard.

I guess the device width has to be fixed, and also touchmove event has to be 
prevented, in order to disable panning while trying to turn to next slide.

What version of the product are you using? On what operating system?
Any html5 slides
on iPad2

Please provide any additional information below.

Original issue reported on code.google.com by natrixna...@gmail.com on 3 Apr 2012 at 8:25

GoogleCodeExporter commented 9 years ago
actually adding the event.preventDefault() on touchmove quite fixed everything..

function handleTouchMove(event) {
  if (event.touches.length > 1) {
    cancelTouch();
  } else {
    touchDX = event.touches[0].pageX - touchStartX;
    touchDY = event.touches[0].pageY - touchStartY;

+    event.preventDefault();
  }
};

Original comment by natrixna...@gmail.com on 3 Apr 2012 at 8:36

Attachments:

GoogleCodeExporter commented 9 years ago
Hope this works as a patch

Original comment by natrixna...@gmail.com on 3 Apr 2012 at 9:04

Attachments: