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

fix bug images not shown in case two images size are almost same. #39

Merged
merged 1 commit into from
Nov 27, 2018

Conversation

minhlucvan
Copy link

Hello world.

Recently I have a project that use angular2-lightbox, but there is one problem is my images are almost same size but a little bit different about some pixels, in that case when user click on the "Next" button the lightbix is getting freeze and the loader spinning forever.

I was debug and found the problem was the "transitionend" is not fired because the images size that I mentioned above. I have fixed this issue and want to make a pull request for any one have same problem.

Thank you.

@minhlucvan minhlucvan changed the title fix bug images not shown in case two images are almost have same size. fix bug images not shown in case two images size are almost have same. Jan 10, 2018
@minhlucvan minhlucvan changed the title fix bug images not shown in case two images size are almost have same. fix bug images not shown in case two images size are almost same. Jan 10, 2018
@themyth92
Copy link
Owner

You mean you have 2 images, which are totally different, but same size, and they cause lightbox to stuck at spinning ?

@minhlucvan
Copy link
Author

minhlucvan commented Jan 12, 2018

yes it is, the different of images size (two different images) are too small so the "transitionend" event can not fired and the lightbox stuck at spinning.

@themyth92
Copy link
Owner

themyth92 commented Jan 17, 2018

Hi there, I have tried on my local and everything seems fine. I use 2 images, one has 300x300 and another one uses 297x297 and it works flawlessly. It is great if you can provide some image examples if possible. Also it can be duplicated from #12

@themyth92
Copy link
Owner

jan-17-2018 16-06-36

@vocrsz
Copy link

vocrsz commented Mar 30, 2018

Hi
We have the same issue in Chrome browser (Safari and Mozilla are ok)
And this fix helps
Thanks
ezgif-1-0b35de9c12

@themyth92
Copy link
Owner

Ok so both images are the same right ?

@tomscript
Copy link

Can someone submit please? :)

@themyth92
Copy link
Owner

Ok i think i will try to merge this and push new update in a few hours

@themyth92 themyth92 merged commit 9c2c9dd into themyth92:master Nov 27, 2018
@tomscript
Copy link

thank you, btw sorry for my unfamiliarity but can someone publish a new version 1.4.1 ?

@themyth92
Copy link
Owner

Sorry forgot to publish version. 1.4.1 should be on npm now

tomscript added a commit to tomscript/ngx-lightbox that referenced this pull request Nov 26, 2019
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

Successfully merging this pull request may close these issues.

4 participants