diff --git a/mobile/src/components/rich-markdown/document-style.ts b/mobile/src/components/rich-markdown/document-style.ts index 06b3bd93509..c7f1f443b39 100644 --- a/mobile/src/components/rich-markdown/document-style.ts +++ b/mobile/src/components/rich-markdown/document-style.ts @@ -2,6 +2,7 @@ import { colors, getMobileColorScheme } from '../../theme/mobile-theme' import { TEXT_INPUT_FONT_SIZE } from '../../platform/text-input-font-size' // Read theme at build time; native embeds sheet, page scopes it to editor host. +// #editor scrolls itself: iOS WebKit stops drawing selection ~2 screens into an editable scrolled by a separate box (#34472). // Bind size to text-input seam: native body size, web>=16px floor prevents iOS focus zoom that keyboard seam mistakes for no keyboard; one binding keeps both hosts aligned. export function richMarkdownEditorStyle(): string { return ` :root { @@ -26,11 +27,11 @@ export function richMarkdownEditorStyle(): string { background: var(--editor-surface); color: var(--foreground); font-family: var(--font-sans); - overscroll-behavior: contain; } - body { overflow: auto; } #editor { - min-height: 100vh; + height: 100%; + overflow: auto; + overscroll-behavior: contain; padding: 18px 16px 112px; outline: none; font-size: ${TEXT_INPUT_FONT_SIZE}px; diff --git a/mobile/src/components/rich-markdown/page-stylesheet.test.ts b/mobile/src/components/rich-markdown/page-stylesheet.test.ts index e19f00b1a2d..60d29f1bdb0 100644 --- a/mobile/src/components/rich-markdown/page-stylesheet.test.ts +++ b/mobile/src/components/rich-markdown/page-stylesheet.test.ts @@ -20,7 +20,7 @@ describe('the editor stylesheet on the page', () => { expect(scoped).toContain('--foreground:') const rootRules = scoped .split('}') - .filter((rule) => rule.includes('--foreground:') || rule.includes('overscroll-behavior:')) + .filter((rule) => rule.includes('--foreground:') || rule.includes('min-height: 100%')) expect(rootRules.length).toBeGreaterThan(0) for (const rule of rootRules) { expect(rule.trimStart().startsWith(PREFIX)).toBe(true)