New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 647704 link

Starred by 5 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Text input not handling maxlength attribute correctly on Android Chrome

Reported by toufali....@gmail.com, Sep 16 2016

Issue description

Example 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:
 

Comment 1 by bokan@chromium.org, Sep 16 2016

Components: -Blink UI>Input>Text>IME Blink>Input
Labels: -Pri-2 Hotlist-Input-Dev Pri-3
Status: Untriaged (was: Unconfirmed)
Confirmed. This reproduces with the default keyboard but not with Switfkey. I'm suspecting interaction with keyboard/IME.
Cc: dtapu...@chromium.org
Owner: chongz@chromium.org
Status: Assigned (was: Untriaged)
Assigning to Chong given his related work on keyboard/IME. Feel free to re-assign if you are not the right owner.

Comment 3 by jta...@gmail.com, 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

Comment 4 by chongz@chromium.org, Jan 10 2017

Cc: aelias@chromium.org
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.

Comment 5 Deleted

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

Comment 7 by chongz@chromium.org, Jan 11 2018

Cc: chongz@chromium.org rlanday@chromium.org yosin@chromium.org changwan@chromium.org
Components: Blink>Editing
Owner: ----
Status: Available (was: Assigned)
CCing a few folks. Un-assigning myself.
Project Member

Comment 8 by sheriffbot@chromium.org, Jan 14

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
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