@txstate-mws/svelte-components 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -95,8 +95,8 @@ const windowclick = (e) => {
|
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
</script>
|
|
98
|
-
<svelte:window on:
|
|
99
|
-
<div class={className} role="alertdialog" aria-modal="true" on:click|stopPropagation on:keydown|stopPropagation={keydown} on:focusin={focusin}>
|
|
98
|
+
<svelte:window on:mousedown={windowclick} />
|
|
99
|
+
<div class={className} role="alertdialog" aria-modal="true" on:click|stopPropagation on:mousedown|stopPropagation on:keydown|stopPropagation={keydown} on:focusin={focusin}>
|
|
100
100
|
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
|
101
101
|
<div bind:this={abovelockelement} tabindex="0"></div>
|
|
102
102
|
<div bind:this={lockelement} on:keydown={keydown}>
|
package/components/Modal.svelte
CHANGED
|
@@ -24,7 +24,7 @@ onMount(() => {
|
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
27
|
-
<div use:portal={usePortal} class="modal-backdrop" class:opaque on:
|
|
27
|
+
<div use:portal={usePortal} class="modal-backdrop" class:opaque on:mousedown|stopPropagation|preventDefault={() => escapable && endmodal()}>
|
|
28
28
|
<FocusLock class="modal-container {containerClass}" {escapable} on:escape {hidefocus} {hidefocuslabel} {returnfocusto} {initialfocus}>
|
|
29
29
|
<slot></slot>
|
|
30
30
|
</FocusLock>
|