question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PhotoBrowser open() doesn't work with index >= 1

See original GitHub issue

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:

  1. Add PhotoBrowser with photo array in it
  2. 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.
  3. 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:open
  • Created a year ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
p7161commented, Nov 6, 2022

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:

<f7-photo-browser
        :swiper="{cssMode:false}"
    ></f7-photo-browser>
0reactions
SergeyPetrovICScommented, Nov 9, 2022

@p7161, It works. Thank you!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found