Skip to content

Commit 13cbcd1

Browse files
authored
add cleanup to onDestroy
Needed in cases where NumberSpinner was destroyed as soon as dragend fires
1 parent 0cef8ce commit 13cbcd1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/NumberSpinner.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@
6969
onMount(() => {
7070
htmlNode = document.querySelector("html");
7171
htmlNodeOriginalCursor = htmlNode.style.cursor;
72+
73+
return () => {
74+
htmlNode.style.cursor = htmlNodeOriginalCursor;
75+
}
7276
});
7377
7478
// update all values (preciseValue, visibleValue)

0 commit comments

Comments
 (0)