mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
refac
This commit is contained in:
@@ -40,12 +40,14 @@
|
|||||||
onMount(() => {
|
onMount(() => {
|
||||||
if (floatingButtons) {
|
if (floatingButtons) {
|
||||||
contentContainerElement?.addEventListener('mouseup', updateButtonPosition);
|
contentContainerElement?.addEventListener('mouseup', updateButtonPosition);
|
||||||
|
document.addEventListener('mouseup', updateButtonPosition);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
if (floatingButtons) {
|
if (floatingButtons) {
|
||||||
contentContainerElement?.removeEventListener('mouseup', updateButtonPosition);
|
contentContainerElement?.removeEventListener('mouseup', updateButtonPosition);
|
||||||
|
document.removeEventListener('mouseup', updateButtonPosition);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user