Fix loading image expansion in clones.
This commit is contained in:
parent
50a13f306f
commit
354f566672
@ -3224,8 +3224,15 @@ ImageExpand =
|
||||
name: 'Image Expansion'
|
||||
cb: @node
|
||||
node: ->
|
||||
return unless @file and @file.isImage
|
||||
$.on @file.thumb.parentNode, 'click', ImageExpand.cb.toggle
|
||||
return unless @file?.isImage
|
||||
{thumb} = @file
|
||||
$.on thumb.parentNode, 'click', ImageExpand.cb.toggle
|
||||
if @isClone and $.hasClass thumb, 'expanding'
|
||||
# If we clone a post where the image is still loading,
|
||||
# make it loading in the clone too.
|
||||
ImageExpand.contract @
|
||||
ImageExpand.expand @
|
||||
return
|
||||
if ImageExpand.on and !@isHidden
|
||||
ImageExpand.expand @
|
||||
cb:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user