Maxlength counter counts line breaks as two characters

Created on 19 September 2023, about 1 year ago
Updated 23 September 2023, about 1 year ago

Problem/Motivation

If a maxlength is set for a text input element the user may enter as many characters as allowed. But for some reason if only one character is left a paragraph break is counted as two characters.

This makes is possible to enter more characters than allowed. This will lead to a validation error that is not obvious to the user unless the counter is enabled.

Steps to reproduce

  1. Set up a form with a text field and a maxlength of 1000.
  2. Enter some text of length 999
  3. Press enter in the end for a paragraph break which is counted a two characters.
  4. The field has now more characters than allowed
πŸ› Bug report
Status

Closed: won't fix

Version

6.1

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany demonde

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024