Bug 8106

Summary: REGRESSION (NativeTextField): New text fields don't scroll to the beginning when losing focus
Product: WebKit Reporter: mitz
Component: FormsAssignee: Darin Adler <darin>
Status: VERIFIED FIXED    
Severity: Normal Keywords: Regression
Priority: P1    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
patch with detailed change log and a layout test
none
patch to handle RTL case, including adding it to the test case mjs: review+

Description mitz 2006-03-31 09:51:28 PST
New text fields don't scroll back to the beginning when they are unfocused.

To reproduce: enter long text in a text field, making it scroll to the right (to show the end of the text), then click outside the text field (to unfocus it).

Expected result: the text field should scroll to the left, showing the beginning of the text, when it's unfocused.

Actual result: the text field doesn't scroll back when it's unfocused.
Comment 1 Darin Adler 2006-04-01 00:33:45 PST
I've got a fix for this one.
Comment 2 Darin Adler 2006-04-01 01:23:50 PST
Created attachment 7437 [details]
patch with detailed change log and a layout test
Comment 3 Justin Garcia 2006-04-01 14:09:26 PST
Comment on attachment 7437 [details]
patch with detailed change log and a layout test

r=me
Comment 4 mitz 2006-04-01 21:44:38 PST
RTL fields should scroll all the way to the right. The patch made them scroll to the left :-\
Comment 5 Darin Adler 2006-04-01 21:48:28 PST
(In reply to comment #4)
> RTL fields should scroll all the way to the right. The patch made them scroll
> to the left :-\

I have to admit I even thought of that, but I wasn't sure how to code that correctly.
Comment 6 Darin Adler 2006-04-01 22:21:13 PST
I think I have the code right to handle RTL correctly now, but only for the "blur" case, not for text fields that never had focus in the first place.
Comment 7 Darin Adler 2006-04-01 22:24:02 PST
By the way, Firefox does not have this behavior for text fields. You could even consider this an anomaly of AppKit text fields. The reason they scroll to the beginning when they lose focus is that the base field has no scrolling capability, only the field editor does.

So I'm not entirely sure it was a good idea for me to have fixed this!
Comment 8 Darin Adler 2006-04-01 22:34:17 PST
Created attachment 7456 [details]
patch to handle RTL case, including adding it to the test case
Comment 9 Maciej Stachowiak 2006-04-02 23:25:42 PDT
These are all text field regressions so they should all be P1.