#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere
TypeScript dockerhacktoberfestjavapdfpdf-converterpdf-editorpdf-manipulationpdf-mergerpdf-ocrpdf-toolspdf-web-appspdfmergerself-hosted
Merge remote-tracking branch 'origin/main' into SaaS
Anthony Stirlingbbfe29c2ef49
diff --cc frontend/editor/src/core/components/shared/AppConfigModal.tsxindex 3b6bb4a9ce,f4efe6d518..628c07a552--- a/frontend/editor/src/core/components/shared/AppConfigModal.tsx+++ b/frontend/editor/src/core/components/shared/AppConfigModal.tsx@@@ -24,7 -24,6 +24,7 @@@ importuseUnsavedChanges,} from "@app/contexts/UnsavedChangesContext";import { SettingsSearchBar } from "@app/components/shared/config/SettingsSearchBar";- import { stripBasePath } from "@app/constants/app";++import { stripBasePath, withBasePath } from "@app/constants/app";interface AppConfigModalProps {opened: boolean;@@@ -77,9 -83,36 +84,37 @@@ const AppConfigModalInner: React.FC<App}}, [opened]);- // Handle custom events for backwards compatibility.- // Use replace when already on /settings/* so external tab-switches- // don't pile up history entries that would break close-by-back.+ // Switch tab without forcing every `useLocation()` subscriber (HomePage and+ // its FileSidebar/Workbench/RightSidebar/FileManager tree) to re-render.+ //+ // First entry into /settings/* still goes through React Router so HomePage's+ // location-watching effect opens the modal and pushes a real history entry -+ // so the back button can close us. Subsequent tab clicks bypass React Router+ // and mutate the URL bar via `history.replaceState`. The browser sees the+ // URL update (deep-link / refresh still work) but React Router never fires a+ // location change, so the layer behind the Mantine overlay never repaints+ // and the backdrop-filter blur stops flashing.+ const switchSection = useCallback(+ (key: NavKey) => {+ setActive(key);- const alreadyInSettings =- window.location.pathname.startsWith("/settings");++ const alreadyInSettings = stripBasePath(++ window.location.pathname,++ ).startsWith("/settings");+ if (alreadyInSettings) {+ window.history.replaceState(+ window.history.state,+ "",- `/settings/${key}`,++ withBasePath(`/settings/${key}`),+ );+ } else {+ navigate(`/settings/${key}`);+ }+ },+ [navigate],+ );++ // Backwards-compat: external `appConfig:navigate` events route through the+ // same switchSection path so they get the no-flash treatment too.useEffect(() => {const handler = (ev: Event) => {const detail = (ev as CustomEvent).detail as { key?: NavKey } | undefined;