PayFlow: correct modal closure (Escape / click outside)

This commit is contained in:
akovalenko committed 2021-07-17 22:55:39 +03:00
1 parent 4cb14b6b7f
commit a727f59503
1 file changed
+7 -3
+7 -3
View File
@@ -88,9 +88,14 @@
}
const canShare = !!navigator.share;
const dismiss = () => {
lnurl=undefined;
isOpen=false
}
</script>
<Modal {isOpen} size='lg'>
<Modal {isOpen} toggle={dismiss} size='lg'>
<ModalHeader>BOLT11 invoice: {stage}</ModalHeader>
<ModalBody>
{#if confirmAmount}
@@ -163,8 +168,7 @@
{/if}
<button
class="btn btn-outline-primary"
type="button" on:click="{()=>{isOpen=false; lnurl = null}}">Cancel</button>
type="button" on:click="{dismiss}">Cancel</button>
</div>
</ModalFooter>
</Modal>