So I am doing some testing on our companies site and noticed a "bug" of sorts with the Webkit browsers (Safari/Chrome). I was wondering if anyone has a fix for this.
I understand the logic in why it is doing this. I just don't know why Webkit decided to take the initial default value and apply the max length to it when no other browser does this.
I would expect this to be a wide-known issue in the dev community, and I am sure there is a way to fix but no-one on the internet that I could find has stated a resolution. It was in a bug-tracker it looked like for Webkit. But it would have had to be there forever I imagine, so I don't see it getting fixed there anytime soon.
Maxlength specifies the maximum length (in characters) of an input field. If it's set to 3 then the input should be no longer than 3 characters. Webkit is just following the standard. Width is just a dimension, which has nothing to do with the amount of characters inside the input element.
I know why Webkit is only displaying "3" characters. I was technically looking for a solution to break Web-kit. So that a user can only enter 3-char length but the default value being longer. Not to sound like an ass, but I never mentioned the width having anything to do with the behavior of web-kit. Width was set to 40. Max-Length on the other hand deals with the length of Chars on an input.