Closed mmcev106 closed 8 years ago
I'll check this issue, but I'll need a little time as I don't have a macboock or a ipad...
Did you write a plugin for WP?
My hack seems to work for now, so take your time. If you have any ideas on how to fix the problem, I wouldn't mind implementing and/or testing them.
I just threw together a very basic plugin for my wife's site. I've thought about creating a more polished version that could be published on wordpress.org.
Mark
On Mon, May 9, 2016 at 4:30 PM, Christophe Brisbois < notifications@github.com> wrote:
I'll check this issue, but I'll need a little time as I don't have a macboock or a ipad...
Did you write a plugin for WP?
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/Kris-B/nanoGALLERY/issues/117#issuecomment-217995981
can you please check this page: http://nanogallery.brisbois.fr/testsafari2.html
Tested in Safari on Desktop and iPad, on both your test link and the original site (after updating). It seems to work great now. Thanks very much!
thanks for your feedback!
New version just released: https://github.com/Kris-B/nanoGALLERY/releases/tag/v5.10.1
I am able to reproduce this almost every time in Safari on both a Macbook and and iPad Air by doing the following:
I have already done some troubleshooting. It appears that image elements created for images that already exist in the resource cache (both isChecked and isConfirmed are true) have a naturalWidth and naturalHeight of "0" for a split second before their elements are fully initialized (img.complete is still false). If nanoGALLERY happens to call thumbSetImgHeight() during this time, both dimensions get set to "0", and the gallery does not render properly. I was able to work around the issue by adding the following lines after the "var resource..." line in the LoadingImage.prototype.check() method:
I'm hesitant to create a pull request since you might have a better long term fix in mind. If you have a better idea, I don't mind implementing it. Let me know if I can help further.
I should mention that I have also seen this happen a few times in Chrome while troubleshooting, but it is very rare (perhaps 1/100 refreshes).