PhotoBrowser open() doesn't work with index >= 1
See original GitHub issue- Framework7 version: 7.0.5
- React.js version: 17.0.2
- Platform and Target: iOS 15.5 Safari browser and Android Browsers (Chrome, Firefox)
- Live Code Link: https://codesandbox.io/s/little-sunset-mwk0c7?file=/src/MainPage.js (Demo App - https://mwk0c7.csb.app/)
Describe the bug
Combing Swiper (contains preview images) and PhotoBrowser (will open when preview image is clicked) occures problem when clicking 2nd and futher preview image - PhotoBrowser opens with black screen (no full image is showing, no “of” (NavbarOfText ) is empty ).
To Reproduce
Steps to reproduce the behavior:
- Add PhotoBrowser with photo array in it
- Add Swiper with slides containg images from this photo array. Each slide has callback like
PhotoBrowserRef.current.open(idx)
where idx is photo index in array. - Click 2nd or further preview image
Expected behavior
PhotoBrowser opens - 2nd full image is showing and NavbarOfText
contains: “2 of X”
Actual Behavior
PhotoBrowser opens with empty black screen and NavbarOfText
contains: “of”
Screenshots
https://i.postimg.cc/K8mR4LH9/bug.png
Additional context
Demo app works fine on Desktop browsers. Bug always occures in Mobile Browsers and sometimes in Desktop browser during development on localhost.
Issue Analytics
- State:
- Created a year ago
- Comments:12
Top Results From Across the Web
Photobrowser dynamic index problem - Framework7 Forum
Hi , I'm using v5.4.2 when I'm using dynamic photo then open photo browser from index 0 the image is blank but If...
Read more >Photo Browser image not showing when @click open the first ...
I try to modify the function to open the first photo with: @click="openPopupDark('0') The function is openPopupDark: function (whichPhoto) ...
Read more >Images Not Displaying on HTML Index Page, but Show up on ...
Next I tried to link the images that aren't working to one of the other pages and they don't work there either. I've...
Read more >Chaptrs Photo Browser on the Mac App Store - Apple
Did not work for me. Not even once. It won't open or run and I have the paid in full version. Wasted cash....
Read more >Why can I not see the images on my website? - Encode.Host
The image does not have the same file name as specified in your IMG tag. ... Broken links or images cannot be caused...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem is in cssMode swiper parameter In photo-browser-class.js in line 358:
cssMode: typeof pb.params.swiper.cssMode === 'undefined' && (app.device.ios || app.device.android) ? true : pb.params.swiper.cssMode,
Set cssMode to false and problem will disappear
In vue for example:
@p7161, It works. Thank you!