Bug 8407 - REGRESSION (NativeTextField): Leading and trailing spaces trimmed from text field value attribute
Summary: REGRESSION (NativeTextField): Leading and trailing spaces trimmed from text f...
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Adele Peterson
URL: data:text/html,There%20should%20be%20...
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2006-04-15 03:02 PDT by mitz
Modified: 2006-04-19 02:27 PDT (History)
3 users (show)

See Also:


Attachments
Possible fix for the text field case (818 bytes, patch)
2006-04-15 04:12 PDT, mitz
no flags Details | Formatted Diff | Diff
patch to set white-space:pre (4.25 KB, patch)
2006-04-18 00:01 PDT, Adele Peterson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2006-04-15 03:02:53 PDT
<input value=" foo bar "> doesn't show the leading and trailing spaces in the text field.
Comment 1 mitz 2006-04-15 03:55:29 PDT
The contenteditable version of this bug is
<div contenteditable> lorem ipsum </div>
where the outer spaces are initially invisible, but when you add a space at the beginning/end you get two spaces to show.
Comment 2 mitz 2006-04-15 04:12:34 PDT
Created attachment 7726 [details]
Possible fix for the text field case
Comment 3 Darin Adler 2006-04-15 19:18:04 PDT
I think the best way to fix this is to use the appropriate whitespace mode inside the text fields. Assuming there is an appropriate whitespace mode.
Comment 4 Adele Peterson 2006-04-16 15:37:25 PDT
mitz and i talked about using whitespace:pre for the inner div, instead of just whitespace:nowrap.  i will investigate.
Comment 5 Adele Peterson 2006-04-18 00:01:10 PDT
Created attachment 7794 [details]
patch to set white-space:pre
Comment 6 Adele Peterson 2006-04-18 00:01:44 PDT
Comment on attachment 7794 [details]
patch to set white-space:pre

I'll need to re-generate pixel results for this test on a PPC machine before checking in.
Comment 7 Darin Adler 2006-04-18 08:52:41 PDT
Comment on attachment 7794 [details]
patch to set white-space:pre

r=me