diff options
| author | Markerov <mark.taiwan@gmail.com> | 2014-11-29 11:01:30 +0800 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2016-05-05 12:09:55 +0200 |
| commit | fd2b41c1f0d1a2d091f8ee66880b230301b823cc (patch) | |
| tree | c7506a8b09e0450c1840a642ba11871cfa5f87bf /js/inline-expanding.js | |
| parent | bc2257be087ff037c9d84f685df6f064a26efff7 (diff) | |
Fix bug with inline expansion with Unanimate Gif
Issue #273
Diffstat (limited to 'js/inline-expanding.js')
| -rw-r--r-- | js/inline-expanding.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/js/inline-expanding.js b/js/inline-expanding.js index cf8cab81..8da66898 100644 --- a/js/inline-expanding.js +++ b/js/inline-expanding.js @@ -19,7 +19,7 @@ onready(function(){ for (var i = 0; i < link.length; i++) { if (typeof link[i] == "object" && link[i].childNodes && typeof link[i].childNodes[0] !== 'undefined' && link[i].childNodes[0].src && link[i].childNodes[0].className.match(/post-image/) && !link[i].className.match(/file/)) { link[i].onclick = function(e) { - var img, post_body, still_open; + var img, post_body, still_open, canvas; var thumb = this.childNodes[0]; var padding = 5; var boardlist = $('.boardlist')[0]; @@ -43,8 +43,10 @@ onready(function(){ this.dataset.expanded = 'true'; if (thumb.tagName === 'CANVAS') { - this.removeChild(thumb); - thumb.style.display = 'block'; + canvas = thumb; + thumb = thumb.nextSibling; + this.removeChild(canvas); + canvas.style.display = 'block'; } thumb.style.opacity = '0.4'; |
