mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +08:00
FIX: ensures lightbox is working after collapse/expand (#20724)
Prior to this fix, the upload was removed from DOM when collapsed and not decorated again on expand, which was causing lightbox to not get reapplied. The fix is reverting to previous state where content was not removed from DOM.
This commit is contained in:
@ -2,30 +2,18 @@
|
||||
{{#if this.hasUploads}}
|
||||
{{html-safe @cooked}}
|
||||
|
||||
<Collapser
|
||||
@header={{this.uploadsHeader}}
|
||||
@onToggle={{@onToggleCollapse}}
|
||||
as |collapsed|
|
||||
>
|
||||
{{#unless collapsed}}
|
||||
<div class="chat-uploads">
|
||||
{{#each @uploads as |upload|}}
|
||||
<ChatUpload @upload={{upload}} />
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
<Collapser @header={{this.uploadsHeader}} @onToggle={{@onToggleCollapse}}>
|
||||
<div class="chat-uploads">
|
||||
{{#each @uploads as |upload|}}
|
||||
<ChatUpload @upload={{upload}} />
|
||||
{{/each}}
|
||||
</div>
|
||||
</Collapser>
|
||||
{{else}}
|
||||
{{#each this.cookedBodies as |cooked|}}
|
||||
{{#if cooked.needsCollapser}}
|
||||
<Collapser
|
||||
@header={{cooked.header}}
|
||||
@onToggle={{@onToggleCollapse}}
|
||||
as |collapsed|
|
||||
>
|
||||
{{#unless collapsed}}
|
||||
{{cooked.body}}
|
||||
{{/unless}}
|
||||
<Collapser @header={{cooked.header}} @onToggle={{@onToggleCollapse}}>
|
||||
{{cooked.body}}
|
||||
</Collapser>
|
||||
{{else}}
|
||||
{{cooked.body}}
|
||||
|
Reference in New Issue
Block a user