Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First image of config object won't appear when >= 769px but gallery acts normal if <769px #483

Open
larsactionhero opened this issue Apr 11, 2024 · 2 comments

Comments

@larsactionhero
Copy link

larsactionhero commented Apr 11, 2024

Describe the bug
I've run into this while using a link trigger to open a glightbox.
If screen size is >= 769px: first image of elements object won't show up.
If screen size is < 769px: gallery works as expected.

But when 1st item in config object does not contain the following entries...

'type': 'image',
'title': 'Another title',
'alt': 'image alt text'

...gallery works as expected, regardless of screen size (see example #2 in codepen)

Are you able to reproduce the bug in the demo site
No.

To Reproduce
Steps to reproduce the behavior:

  1. this following codepen example uses the basic setup from the docs.
    in this example, the gallery elements are defined by the 'elements' object.
    https://codepen.io/larsactionhero/pen/MWRXpYb
  1. resize screen to >= 769px. first image won't show up.
  2. resize screen to < 769px. first image will show up and gallery works as expected.

Expected behavior
It should open the 1st image right away.

Post the code you are using
https://codepen.io/larsactionhero/pen/MWRXpYb

Screenshots
Additional screenshot of my console error (taken from my current project where it appeared)
Bildschirmfoto 2024-04-11 um 18 05 33

Desktop:

  • OS: Mac OS
  • Browser Firefox 124.0.2, Chrome 123.0.6312.107, Brave 1.64.116
@larsactionhero larsactionhero changed the title 1st image of config won't appear when <769px but below acts normal 1st image of config object won't appear when >= 769px but acts normal if <769px Apr 11, 2024
@larsactionhero larsactionhero changed the title 1st image of config object won't appear when >= 769px but acts normal if <769px First image of config object won't appear when >= 769px but gallery acts normal if <769px Apr 11, 2024
@gingerchew
Copy link
Collaborator

That is odd. If you use the last release from Github (3.2.0) the issue goes away.

@larsactionhero
Copy link
Author

That is odd. If you use the last release from Github (3.2.0) the issue goes away.

Thanks for your reply.
But shown codepen example already uses v3.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants