We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b880f1d commit 939db17Copy full SHA for 939db17
1 file changed
packages/autocomplete-js/src/elements/LoadingIcon.ts
@@ -34,5 +34,19 @@ export const LoadingIcon: AutocompleteElement<
34
/>
35
</circle>`;
36
37
+ const pauseAnimations = () => {
38
+ // Wait until the element is in the DOM.
39
+ if (!element.parentElement) {
40
+ setTimeout(pauseAnimations, 0);
41
+ return;
42
+ }
43
+
44
+ element.pauseAnimations();
45
+ };
46
47
+ if ('pauseAnimations' in element) {
48
+ pauseAnimations();
49
50
51
return element;
52
};
0 commit comments