Text input not handling maxlength attribute correctly on Android Chrome
Reported by
toufali....@gmail.com,
Sep 16 2016
|
|||||
Issue descriptionExample URL: https://jsfiddle.net/nfxhtbrv/1/ Steps to reproduce the problem: 1. On Android Chrome, visit https://jsfiddle.net/nfxhtbrv/1/ 2. type more than 15 characters What is the expected behavior? you should not be able to type more than 15 characters What went wrong? I can type more than 15 characters. I notice that pressing spacebar after 15 char is exceeded, the extra characters are then deleted. This is confusing behavior. It seems that as long as there is no space between letters, an unlimited amount are allowed. Note further odd behavior can be found by moving the caret back to a previous point and continuing to type. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? Yes Chrome version: 52.0.2743.98 Channel: stable OS Version: 6.0 Flash Version:
,
Sep 22 2016
Assigning to Chong given his related work on keyboard/IME. Feel free to re-assign if you are not the right owner.
,
Jan 3 2017
I can confirm this is still a bug, when you type letters only. With mixed characters (letters and numbers) and numbers only, the restriction of the maxlength attribute is working properly. Chrome version: 54.0.2840.85 OS Version: 7.0.0; Nexus 9 Build/NRD90M
,
Jan 10 2017
CCing aelias@ for more info. I can confirm that this issue only happens to composition text (e.g. Text with underlines), and the exceeded text will get trimmed before committed to the input field (or rejected by a popup). I don't think there is an easy fix as Chrome has to update composition text exactly as told by the IME. Future IME improvements might be able to break this constrain. Note: Switfkey works differently as they keep composition text inside IME.
,
Oct 6 2017
I have the probem only if have not autocomplete="off" OK (LIMIT 15 ) : <input type="text" maxlength="15" autocomplete="off" spellcheck="false"> KO (No limit) : <input type="text" maxlength="15" spellcheck="false"> Chrome version: 61.0.3163.98 OS Version : 6.0.0
,
Jan 11 2018
CCing a few folks. Un-assigning myself.
,
Jan 14
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by bokan@chromium.org
, Sep 16 2016Labels: -Pri-2 Hotlist-Input-Dev Pri-3
Status: Untriaged (was: Unconfirmed)