RadLikeWhoa / Countable

Add live paragraph-, word- and character-counting to an HTML element.
https://sacha.me/Countable
MIT License
1.64k stars 134 forks source link

Wrong counter on mobile #51

Closed oclockvn closed 6 years ago

oclockvn commented 6 years ago

Hi @RadLikeWhoa

Got this issue on mobile only (Android 7.0.0, Chrome 67)

I have a textarea with maxlength="3", it shows 3 characters but still count (see image below)

image

Hope anyone fix it soon 😄

RadLikeWhoa commented 6 years ago

This seems to be an issue with Chrome on Android (https://caniuse.com/#feat=maxlength) and the way they handle the maxlength attribute. Text can be entered past the specified max length, but it is cut off once the area loses focus.

I don't think fixing this is in scope for Countable as it is such a specific issue for Chrome on Android and would essentially require overriding the input handling for textareas. Closing this for now.