Bug 14388 - Input in text fields limited to 1024 characters
Summary: Input in text fields limited to 1024 characters
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://archlinux.org/~jeff/safari_for...
Keywords:
: 15048 (view as bug list)
Depends on:
Blocks: 44883
  Show dependency treegraph
 
Reported: 2007-06-25 08:42 PDT by Adam Roben (:aroben)
Modified: 2011-10-02 21:53 PDT (History)
3 users (show)

See Also:


Attachments
testcase (711 bytes, text/html)
2007-06-25 08:54 PDT, Adam Roben (:aroben)
no flags Details
Remove hard-coded 1024 length limit (1.82 KB, patch)
2007-06-25 08:57 PDT, Alp Toker
aroben: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2007-06-25 08:42:58 PDT
http://archlinux.org/~jeff/safari_forms.html reports that text fields are hard-limited to 1024 characters in WebKit. Setting the length attribute to something greater seems to have no effect.

Alp Toker says that 1024 is hard-coded into HTMLInputElement.cpp in many places as a length-limiter.
Comment 1 Adam Roben (:aroben) 2007-06-25 08:54:51 PDT
Created attachment 15223 [details]
testcase
Comment 2 Alp Toker 2007-06-25 08:57:34 PDT
Created attachment 15224 [details]
Remove hard-coded 1024 length limit

A sensible upper limit should be chosen here. I went with 16384.
Comment 3 Adam Roben (:aroben) 2007-06-25 09:06:21 PDT
Comment on attachment 15224 [details]
Remove hard-coded 1024 length limit

I think we should try to figure out what other browsers do before we decide on a new limit. I do like that you put the limit into a variable, though.
Comment 4 Matthew Amacker 2007-06-27 15:57:57 PDT
From testing, and not looking at code, it would appear that there is no limit to the number of characters that are allowed to be entered on IE6 and Firefox 1.5.

Though both IE6 and Firefox 1.5 begin to improperly render the characters when the strings gets to be about 500K characters long.

Largest string I entered into the box on both IE6 and Firefox was: 1.7 million.  Though I stopped at that point figuring it was probably not a small number.

Lastly, it appears Safari:2.0.4(419.3) allows 11024 characters in its input boxes.

Looking forward to a fix for this one as I exploit the text box's ability on Amazon.com. 
Comment 5 Adam Roben (:aroben) 2007-07-05 19:00:21 PDT
Landed a slightly modified version as r24037
Comment 6 Adam Roben (:aroben) 2007-08-22 11:34:02 PDT
*** Bug 15048 has been marked as a duplicate of this bug. ***