Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upText input doesn't allow to delete characters if length is greater than maxlength #25420
Labels
Projects
Comments
|
Looks like this case is explicitly called out in the code: servo/components/script/textinput.rs Lines 450 to 457 in 1e0f2e5 We should definitely ignore any insertions that are beyond the max length, but I think we should be allowing deletions. |
|
@highfive assign me |
|
Hey @teapotd! Thanks for your interest in working on this issue. It's now assigned to you! |
bors-servo
added a commit
that referenced
this issue
Jan 11, 2020
Allow deletions from overflowed textinput Allow deletions from textinput when the length is greater than the max length. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25420 - [X] There are tests for these changes
bors-servo
added a commit
that referenced
this issue
Jan 16, 2020
Allow deletions from overflowed textinput Allow deletions from textinput when the length is greater than the max length. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25420 - [X] There are tests for these changes
bors-servo
added a commit
that referenced
this issue
Jan 16, 2020
Allow deletions from overflowed textinput Allow deletions from textinput when the length is greater than the max length. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25420 - [X] There are tests for these changes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Servo doesn't allow to delete a character from text input that contains value longer than its maxlength. Other browsers allow it and some WPT tests depend on this behavior (e.g.
html/semantics/forms/constraints/tooLong-input-text-delete-manual.html).Example:
./mach run -d 'data:text/html,<input value="123456" maxlength="3">'Try to use backspace in this field.