destroy entire dialog when closed
This commit is contained in:
parent
8d6cb56421
commit
5a23235529
|
@ -1,4 +1,11 @@
|
||||||
<ModalDialog :label :shown :closed :title background="var(--main-bg)">
|
<ModalDialog
|
||||||
|
:label
|
||||||
|
:shown
|
||||||
|
:closed
|
||||||
|
:title
|
||||||
|
background="var(--main-bg)"
|
||||||
|
on:destroyDialog="destroy()"
|
||||||
|
>
|
||||||
<ComposeBox realm="dialog" size="slim" autoFocus="true" on:postedStatus="onPostedStatus()" />
|
<ComposeBox realm="dialog" size="slim" autoFocus="true" on:postedStatus="onPostedStatus()" />
|
||||||
</ModalDialog>
|
</ModalDialog>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
<ModalDialog :label :shown :closed background="var(--main-bg)" on:close="onClose()">
|
<ModalDialog
|
||||||
|
:label
|
||||||
|
:shown
|
||||||
|
:closed background="var(--main-bg)"
|
||||||
|
on:close="onClose()"
|
||||||
|
on:destroyDialog="destroy()"
|
||||||
|
>
|
||||||
<form class="confirmation-dialog-form">
|
<form class="confirmation-dialog-form">
|
||||||
<p>
|
<p>
|
||||||
{{text}}
|
{{text}}
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
<ModalDialog :label :shown :closed :title background="var(--main-bg)">
|
<ModalDialog
|
||||||
|
:label
|
||||||
|
:shown
|
||||||
|
:closed
|
||||||
|
:title
|
||||||
|
background="var(--main-bg)"
|
||||||
|
on:destroyDialog="destroy()"
|
||||||
|
>
|
||||||
<div class="custom-emoji-container">
|
<div class="custom-emoji-container">
|
||||||
{{#if emojis.length}}
|
{{#if emojis.length}}
|
||||||
<ul class="custom-emoji-list">
|
<ul class="custom-emoji-list">
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
background="var(--muted-modal-bg)"
|
background="var(--muted-modal-bg)"
|
||||||
muted="true"
|
muted="true"
|
||||||
className="image-modal-dialog"
|
className="image-modal-dialog"
|
||||||
|
on:destroyDialog="destroy()"
|
||||||
>
|
>
|
||||||
{{#if type === 'gifv'}}
|
{{#if type === 'gifv'}}
|
||||||
<AutoplayVideo
|
<AutoplayVideo
|
||||||
|
|
|
@ -148,8 +148,9 @@
|
||||||
a11yDialog.on('hide', () => {
|
a11yDialog.on('hide', () => {
|
||||||
a11yDialog.destroy()
|
a11yDialog.destroy()
|
||||||
this.fire('close')
|
this.fire('close')
|
||||||
this.destroy()
|
console.log('destroyDialog()')
|
||||||
document.body.removeChild(dialogElement)
|
this.fire('destroyDialog')
|
||||||
|
requestAnimationFrame(() => document.body.removeChild(dialogElement))
|
||||||
})
|
})
|
||||||
this.observe('shown', shown => {
|
this.observe('shown', shown => {
|
||||||
if (shown) {
|
if (shown) {
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
<ModalDialog :label :shown :closed :title background="var(--main-bg)">
|
<ModalDialog
|
||||||
|
:label
|
||||||
|
:shown
|
||||||
|
:closed
|
||||||
|
:title
|
||||||
|
background="var(--main-bg)"
|
||||||
|
on:destroyDialog="destroy()"
|
||||||
|
>
|
||||||
<GenericDialogList :items on:click="onClick(event)" />
|
<GenericDialogList :items on:click="onClick(event)" />
|
||||||
</ModalDialog>
|
</ModalDialog>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
<ModalDialog :label :shown :closed :title background="var(--main-bg)">
|
<ModalDialog
|
||||||
|
:label
|
||||||
|
:shown
|
||||||
|
:closed
|
||||||
|
:title
|
||||||
|
background="var(--main-bg)"
|
||||||
|
on:destroyDialog="destroy()"
|
||||||
|
>
|
||||||
<GenericDialogList :items on:click="onClick(event)"/>
|
<GenericDialogList :items on:click="onClick(event)"/>
|
||||||
</ModalDialog>
|
</ModalDialog>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<ModalDialog :label
|
<ModalDialog
|
||||||
:shown
|
:label
|
||||||
background="var(--muted-modal-bg)"
|
:shown
|
||||||
muted="true"
|
background="var(--muted-modal-bg)"
|
||||||
className="video-modal-dialog"
|
muted="true"
|
||||||
|
className="video-modal-dialog"
|
||||||
|
on:destroyDialog="destroy()"
|
||||||
>
|
>
|
||||||
<video poster="{{poster}}"
|
<video poster="{{poster}}"
|
||||||
src="{{src}}"
|
src="{{src}}"
|
||||||
|
|
Loading…
Reference in a new issue