Repository navigation
fix(ios): put the key-term field's caret before the placeholder - #255
Merged
Merged
Conversation
On an empty field the blinking caret was drawn after the placeholder
("New key term|"), where nothing will be typed. A system text field draws
it at the start ("|New key term") and only follows the text once there is
some. TermField now does the same: caret first on an empty field, after
the draft once one exists, with its gap on the side facing the text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
In the iPhone keyboard's Add key term field, the blinking caret was drawn at the end of the empty placeholder:
A system text field puts it at the start, where the first letter will land:
TermFieldnow draws the caret before the placeholder while the field is empty, and after the typed text once there is some (unchanged). The caret's small gap now sits on the side facing the text in both cases.One file:
App/BlurtiOS/BlurtKeyboard/Sources/TermField.swift.Testing
scripts/ios-check.sh: ok (144 iPhone tests passed,swiftlint analyzeand periphery clean, probe bundle compiled).swift-format lint --strictandswiftlint lint --stricton the file: clean.scripts/ios-keyboard-flows.sh(which screenshots the key-term step) needs the Blurt keyboard enabled on the simulator by hand, which this machine doesn't have. Worth a glance on a device or simulator: tap +, the caret should blink before "New key term".🤖 Generated with Claude Code