Chrome for mobile input field maxlength 行为

Dar*_*ppo 6 html javascript forms mobile google-chrome

我注意到在输入字段上使用 maxLength 属性时,Chrome for mobile 将允许输入比 maxLength 多的字符,然后在该字段失去焦点时减少到最大长度量。

Chrome for mobile 是我见过的唯一表现出这种特殊行为的浏览器。

我们的 QA 团队已将此作为我们正在开发的移动应用程序上的错误提出,尽管我们可以使用 JavaScript 强制执行它,但出于各种原因,我们对走这条路犹豫不决。

有没有一种简单的方法可以改变这种行为,或者是破解它还是忍受它?