-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Issue:
When using a confirmation dialog in a component opened within a modal, the modal closes automatically upon confirmation. This behavior is illustrated in the following code snippet:
Code:
<!-- ContentForModal.svelte -->
[...]
<script>
function invokeActionWithNativeJsConfirm() {
if (confirm('Are you sure?')) {
console.log('im sure');
}
}
</script>
[...]
<button
type="button"
on:click={() => {
invokeActionWithNativeJsConfirm();
}}>Delete
</button>
Steps to reproduce:
- Open the component in a modal.
- Trigger handleRemoveAddressClick.
- Confirm the action in the dialog.
Expected behavior:
The modal should remain open after the confirmation dialog is handled.
Actual behavior:
The modal closes automatically after the confirmation.
Metadata
Metadata
Assignees
Labels
No labels