This commit is contained in:
Timothy J. Baek 2024-10-05 03:19:55 -07:00
parent 3e7a163660
commit fe7e7abf15

View File

@ -40,12 +40,14 @@
onMount(() => {
if (floatingButtons) {
contentContainerElement?.addEventListener('mouseup', updateButtonPosition);
document.addEventListener('mouseup', updateButtonPosition);
}
});
onDestroy(() => {
if (floatingButtons) {
contentContainerElement?.removeEventListener('mouseup', updateButtonPosition);
document.removeEventListener('mouseup', updateButtonPosition);
}
});
</script>