Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

Remove mobile editor history guard

yoma7536ac727c68
diff --git a/apps/web/src/components/MobileStandaloneTiptapEditor.tsx b/apps/web/src/components/MobileStandaloneTiptapEditor.tsx
index 19751a17..254ed860 100644
--- a/apps/web/src/components/MobileStandaloneTiptapEditor.tsx
+++ b/apps/web/src/components/MobileStandaloneTiptapEditor.tsx
@@ -517,12 +517,6 @@ export const MobileStandaloneTiptapEditor = ({
}, [editor, focusEditorAfterLoad, memoId, readLocalDraft, scheduleMetadataSave, setSaveStateStable]);
useEffect(() => {
- window.history.replaceState({ edgeeverMobileEditor: true }, "");
- window.history.pushState({ edgeeverMobileEditorBackGuard: true }, "");
-
- const handlePopState = () => {
- void leavePage();
- };
const handlePageHide = () => {
if (dirtyRef.current) {
persistLocalDraft();
@@ -536,12 +530,10 @@ export const MobileStandaloneTiptapEditor = ({
}
};
- window.addEventListener("popstate", handlePopState);
window.addEventListener("pagehide", handlePageHide);
document.addEventListener("visibilitychange", handleVisibilityChange);
return () => {
- window.removeEventListener("popstate", handlePopState);
window.removeEventListener("pagehide", handlePageHide);
document.removeEventListener("visibilitychange", handleVisibilityChange);
if (saveTimerRef.current !== null) {
@@ -551,7 +543,7 @@ export const MobileStandaloneTiptapEditor = ({
window.clearTimeout(initialFocusTimerRef.current);
}
};
- }, [leavePage, persistLocalDraft, saveNow]);
+ }, [persistLocalDraft, saveNow]);
const saveLabel = getMobileEditorSaveLabel(saveState);
const statusClassName = getMobileEditorStatusClassName(saveState);
diff --git a/apps/web/src/components/WorkspaceApp.tsx b/apps/web/src/components/WorkspaceApp.tsx
index 15b620fa..28b3bc8b 100644
--- a/apps/web/src/components/WorkspaceApp.tsx
+++ b/apps/web/src/components/WorkspaceApp.tsx
@@ -1121,8 +1121,8 @@ export const WorkspaceApp = ({
}
void Promise.all([
- queryClient.invalidateQueries({ queryKey: ["memos"], refetchType: "inactive" }),
- queryClient.invalidateQueries({ queryKey: ["notebooks"], refetchType: "inactive" }),
+ queryClient.invalidateQueries({ queryKey: ["memos"] }),
+ queryClient.invalidateQueries({ queryKey: ["notebooks"] }),
]);
};