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): keep the icon picker on screen as dialogs slide up
Elian Doran88f9813f5890
diff --git a/apps/client/src/widgets/react/Modal.css b/apps/client/src/widgets/react/Modal.cssindex c844fe93d8..416341aeea 100644--- a/apps/client/src/widgets/react/Modal.css+++ b/apps/client/src/widgets/react/Modal.css@@ -48,9 +48,10 @@opacity: 1;transition: background-color 200ms ease-in;+ /* `translate` rather than `transform`, which each dialog sets for its horizontal placement. */.modal-dialog {- transform: translate(-50%, calc(100% + var(--mobile-sheet-margin, 0px)));- transition: transform 200ms cubic-bezier(0.4, 0, 1, 1);+ translate: 0 calc(100% + var(--mobile-sheet-margin, 0px));+ transition: translate 200ms cubic-bezier(0.4, 0, 1, 1);}&.show {@@ -58,8 +59,8 @@transition-timing-function: ease-out;.modal-dialog {- transform: translateX(-50%);- transition: transform 300ms cubic-bezier(0.32, 0.72, 0, 1);+ translate: none;+ transition: translate 300ms cubic-bezier(0.32, 0.72, 0, 1);}}}diff --git a/packages/trilium-e2e/src/note_icon.spec.ts b/packages/trilium-e2e/src/note_icon.spec.tsindex f2a170c0dc..e4523322e1 100644--- a/packages/trilium-e2e/src/note_icon.spec.ts+++ b/packages/trilium-e2e/src/note_icon.spec.ts@@ -11,6 +11,9 @@ import App from "./support/app";*/test("An icon picked while its modal is still opening takes the modal away with it", async ({ page, context }) => {await page.setViewportSize({ width: 412, height: 900 });+ // A phone slides the sheet up, and an icon cannot be tapped until it stops moving, by which+ // time it has opened; with reduced motion the sheet is in place while it is still opening.+ await page.emulateMedia({ reducedMotion: "reduce" });const app = new App(page, context);// A note of the shared database, straight from its address: a phone opens on no note at all, and// the icon of no note is not there to be picked (see NoteIcon).