You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Considering that an image might need too many seconds to load if an image is too large or the network situation is bad, a user will be impatient and click another nav-image before the current one gets loaded. And then this bug will occur.
I have no idea safe enough to fix it, maybe if (self.index !== index) is better.
The text was updated successfully, but these errors were encountered:
I find a bug:
.viewer-list
may have more than one.viewer-active
elements.The bug is caused by https://github.com/fengyuanchen/viewerjs/blob/master/src/js/methods.js#L121 :
Here,
self.viewed
is not a reliable variable to detect if there's an element matching.viewer-active
, because:false
at once whenever an nav-image is clickedtrue
only ifimage.onload ->proxy: load -> initImage -> renderImage
successes (at https://github.com/fengyuanchen/viewerjs/blob/master/src/js/handlers.js#L121)Considering that an image might need too many seconds to load if an image is too large or the network situation is bad, a user will be impatient and click another nav-image before the current one gets loaded. And then this bug will occur.
I have no idea safe enough to fix it, maybe
if (self.index !== index)
is better.The text was updated successfully, but these errors were encountered: