slideout icon indicating copy to clipboard operation
slideout copied to clipboard

Slide opens when zooming / pinching on phone

Open Bobeta opened this issue 6 years ago • 4 comments

Hey & thanks for this great library!

When zooming in on something on a phone (like an image), the slide opens automatically on our site ( www.Saburly.com ) which destroys the UX. Are you experiencing the same issue & any ideas on how to solve it?

Bobeta avatar Sep 14 '18 08:09 Bobeta

I'm running into this too, did you find a solution @Bobeta?

alecrae avatar Nov 28 '18 03:11 alecrae

Try this meta tag; <meta name="viewport" content="width=device-width, user-scalable=no" />

kerembeyazit avatar Mar 01 '19 13:03 kerembeyazit

+1

Tarek-Adra avatar May 30 '21 13:05 Tarek-Adra

found this and works greate :

panel.addEventListener('touchstart', function(eve) {
     let offset = eve.touches[0].pageX;

     if (slideout._orientation !== 1) {
         offset = window.innerWidth - offset;
     }

     slideout._preventOpen = slideout._preventOpen || (offset > slideout._tolerance && !slideout.isOpen());
 });

Tarek-Adra avatar May 30 '21 13:05 Tarek-Adra