@onsvisual/svelte-components 0.1.96 → 0.1.97
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { createEventDispatcher } from "svelte";
|
|
2
|
+
import { onMount, createEventDispatcher } from "svelte";
|
|
3
3
|
|
|
4
4
|
const dispatch = createEventDispatcher();
|
|
5
5
|
const sleep = (ms = 1000) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -137,8 +137,10 @@
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
function handleScriptLoad() {
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
if (!scriptLoaded && window?.accessibleAutocomplete) {
|
|
141
|
+
accessibleAutocomplete = window.accessibleAutocomplete;
|
|
142
|
+
scriptLoaded = true;
|
|
143
|
+
}
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
function initAutocomplete(element) {
|
|
@@ -164,6 +166,8 @@
|
|
|
164
166
|
inputElement = document.getElementById(id);
|
|
165
167
|
inputElement.addEventListener("blur", inputChange);
|
|
166
168
|
}
|
|
169
|
+
|
|
170
|
+
onMount(handleScriptLoad);
|
|
167
171
|
</script>
|
|
168
172
|
|
|
169
173
|
<svelte:head>
|