Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(mobile): fill the screen of the iOS home-screen app on launch
Elian Doran8848751f773f
diff --git a/apps/client/src/index.ts b/apps/client/src/index.tsindex d809a78e57..7469ca7360 100644--- a/apps/client/src/index.ts+++ b/apps/client/src/index.ts@@ -39,6 +39,9 @@ async function bootstrap() {// sequence of its own before this one, so these phases only take effect on server and desktop.initSplashProgress(CLIENT_STARTUP_PHASES);reportSplashPhase("bootstrap");+ // Only iOS sets `navigator.standalone`, and only for a web app added to the home screen.+ const isIosWebApp = (navigator as Navigator & { standalone?: boolean }).standalone === true;+ document.documentElement.classList.toggle("ios-web-app", isIosWebApp);await setupGlob();await Promise.all([initJQuery(),diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.cssindex a90b0b578f..2e55524bd8 100644--- a/apps/client/src/stylesheets/style.css+++ b/apps/client/src/stylesheets/style.css@@ -77,6 +77,14 @@ html {overscroll-behavior: none;}+/* iOS 26 gives a web app added to the home screen a dynamic viewport short by the status bar until+ the first rotation (WebKit bug 301108); the large viewport is the screen's height from the start. */+html.ios-web-app,+html.ios-web-app body,+html.ios-web-app #root-widget {+ height: 100lvh !important;+}+body {/* Fix for CKEditor block gutter icon "stretching" body and causing scrollbar to appear after pressing enteron the last line of the editor. */