Fix image expanding.

This commit is contained in:
Nicolas Stepien 2013-01-22 20:19:18 +01:00
parent 8edd4d5e64
commit fa5f51f1df
3 changed files with 6 additions and 4 deletions

View File

@ -5139,7 +5139,7 @@
}
thumb.hidden = true;
$.addClass(thumb.parentNode.parentNode.parentNode, 'image_expanded');
if (img = thumb.nextSibling) {
if ((img = thumb.nextSibling) && img.nodeName === 'IMG') {
img.hidden = false;
return;
}
@ -5147,7 +5147,7 @@
src: src
});
$.on(img, 'error', ImageExpand.error);
return $.add(a, img);
return $.after(thumb, img);
},
error: function() {
var src, thumb, timeoutID, url;

View File

@ -1,4 +1,6 @@
master
- Mayhem
Fix image expanding.
2.37.5
- Mayhem

View File

@ -4152,13 +4152,13 @@ ImageExpand =
return if /\.pdf$/.test src
thumb.hidden = true
$.addClass thumb.parentNode.parentNode.parentNode, 'image_expanded'
if img = thumb.nextSibling
if (img = thumb.nextSibling) && img.nodeName is 'IMG'
# Expand already loaded picture
img.hidden = false
return
img = $.el 'img', { src }
$.on img, 'error', ImageExpand.error
$.add a, img
$.after thumb, img
error: ->
thumb = @previousSibling