EditableText max characters limit#23496
Merged
alice-i-cecile merged 4 commits intobevyengine:mainfrom Mar 24, 2026
Merged
Conversation
Edits that would increase the length of the text to greater than `max_characters` are ignored.
alice-i-cecile
approved these changes
Mar 24, 2026
Member
alice-i-cecile
left a comment
There was a problem hiding this comment.
This might be a nice place for some tests, but I won't block on it.
viridia
approved these changes
Mar 24, 2026
splo
pushed a commit
to splo/bevy
that referenced
this pull request
Mar 31, 2026
# Objective Add a max characters limit to `EditableText` ## Solution - New field `max_characters: Option<usize>` on `EditableText`. - Queued `TextEdit`s that would cause the text to exceed `max_characters` (if some) are ignored. ## Testing ``` cargo run --example editable_text ``` The right input's max character limit is set to 7. --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.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.
Objective
Add a max characters limit to
EditableTextSolution
max_characters: Option<usize>onEditableText.TextEdits that would cause the text to exceedmax_characters(if some) are ignored.Testing
The right input's max character limit is set to 7.