Skip to content

Build your personal knowledge base with Trilium Notes

chore(mobile): fix warnings in mobile_editor_toolbar

Elian Doranfc59ee6e93d3
diff --git a/apps/client/src/widgets/type_widgets/text/mobile_editor_toolbar.tsx b/apps/client/src/widgets/type_widgets/text/mobile_editor_toolbar.tsx
index 2d40315525..063f500574 100644
--- a/apps/client/src/widgets/type_widgets/text/mobile_editor_toolbar.tsx
+++ b/apps/client/src/widgets/type_widgets/text/mobile_editor_toolbar.tsx
@@ -70,7 +70,7 @@ function usePositioningOniOS(enabled: boolean, wrapperRef: MutableRef<HTMLDivEle
if (!wrapperRef.current) return;
const bottom = window.innerHeight - (window.visualViewport?.height || 0);
wrapperRef.current.style.bottom = `${bottom}px`;
- }, []);
+ }, [ wrapperRef ]);
useEffect(() => {
if (!isIOS() || !enabled) return;
@@ -82,7 +82,7 @@ function usePositioningOniOS(enabled: boolean, wrapperRef: MutableRef<HTMLDivEle
window.visualViewport?.removeEventListener("resize", adjustPosition);
window.removeEventListener("scroll", adjustPosition);
};
- }, [ enabled ]);
+ }, [ enabled, adjustPosition ]);
}
/**