Repository navigation
Fix the text editor's frame and page zoom in iOS Safari - #3
Merged
Merged
Conversation
The dashed frame around text being edited was an outline with an offset, and iOS Safari dropped its left edge while typing. It is now a 1px border around 4px of padding, pulled out by a matching negative margin, so it looks the same and the text stays where it is drawn.
iOS Safari zooms the page in when a text field under 16px gets focus and keeps the zoom afterwards. On a zoomed-out board the text editor's font is often smaller than that. The editor is now laid out at 16px or more and scaled down to the on-screen size around the text's top-left corner, with its frame scaled to match, so the text still lines up with the drawn text.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two problems with the text editor in iOS Safari: its dashed frame lost its left edge while typing, and editing text on a zoomed-out board zoomed the whole page in.
Frame
.rwb-text-editordrew the frame withoutline: 1px dashedandoutline-offset: 4px. It now usesborder: 1px dashedwithpadding: 4pxandmargin: -5px(box-sizing: content-box), which gives the same frame without relying on how Safari paints outlines on a textarea.Page zoom
iOS Safari zooms the page in when a text field under 16px gets focus, and keeps the zoom afterwards. The editor's font is the text size times the board zoom, so on a zoomed-out board it was often under 16px (20px text at 40% is 8px).
transform: scale(k)around the text's top-left corner. Border, padding and margin are divided bykso the frame still looks 1px with 4px of padding.scale(…)transform. It fails without the change.Both fixes are added to the 1.1.1 changelog entry, since 1.1.1 has not been published yet.
Checks
format:check,lint,typecheck,testand the site build pass.scale(0.6), and the text being edited lines up exactly with the same text once committed.Generated by Claude Code