PayFlow: focus on cancel button on modal open

This commit is contained in:
Anton Kovalenko 2021-07-17 23:12:21 +03:00
parent e4dd6f8bcf
commit 3f5163fa55

@ -83,9 +83,11 @@
isOpen=false
}
let cancelButton;
</script>
<Modal {isOpen} toggle={dismiss} size='lg'>
<Modal {isOpen} toggle={dismiss} on:open={()=>cancelButton.focus()} size='lg'>
<ModalHeader>BOLT11 invoice: {stage}</ModalHeader>
<ModalBody>
{#if confirmAmount}
@ -158,6 +160,7 @@
{/if}
<button
class="btn btn-outline-primary"
bind:this={cancelButton}
type="button" on:click="{dismiss}">Cancel</button>
</div>
</ModalFooter>