[v2] Photobrowser pinch-to-zoom only works for first 2 images in iOS UIWebView


#1

I’m using Photobrowser in an app that’s loaded in an iOS UIWebView. After the first two images, pinch-to-zoom stops working…no response. Tap-to-zoom still works.

Also, if I load the same app in iOS Safari, pinch-to-zoom works fine on all images.

Photobrowser swiper options are defaults.

var myPhotoBrowser = app.photoBrowser.create({
	type:'popup',
	theme: 'dark',
	exposition:true,
	backLinkText:'',
	iconsColor: 'gray',
	photos: assetUrls,
	swiper: {
	  	initialSlide: 0,
	  	spaceBetween: 20,
	  	speed: 300,
	  	loop: false,
	  	preloadImages: true,
	  	navigation: {
			nextEl: '.photo-browser-next',
			prevEl: '.photo-browser-prev',
	  	},
	  	zoom: {
			enabled: true,
			maxRatio: 3,
			minRatio: 1,
	  	},
	  	lazy: {
			enabled: true,
	  	},
	},
	on: {
		open: function () {
		  $('.statusbar').css('background-color','black')
		},
		close: function () {
		  $('.statusbar').css('background-color','initial')
		},
	},
});   
myPhotoBrowser.open();

#2

Since no one replied to this, I can confirm this behavior in both IOS and Android. Pinch zoom doesn’t work after the second image. Also, although double-tap does zoom on the third image, the image overflow is clipped, so you can’t drag the zoomed image horizontally or vertically to show more.


#3

This issue must be resolved in latest version, as it was due to Swiper zoom wasn’t compatible with Virtual Slides, which was fixed in latest Swiper versions and in latest F7 versions. Otherwise, you may just set virtualSlides: false PB’s parameter to disable Swiper virtual slides and check does it still happen


#4

Hi, it works with the virtualSlides: false setting, It doesn’t work without that setting in F7 2.0.10


#5

Wait, I just noticed the project I was checking was using F7 2.0.1 not 2.0.10. I’m an idiot. Sorry for wasting your time.