Bug 14388

Summary: Input in text fields limited to 1024 characters
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: adele, jason, matt
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: All   
OS: All   
URL: http://archlinux.org/~jeff/safari_forms.html
Bug Depends on:    
Bug Blocks: 44883    
Attachments:
Description Flags
testcase
none
Remove hard-coded 1024 length limit aroben: review-

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. ***