Bug 8106 - REGRESSION (NativeTextField): New text fields don't scroll to the beginning when losing focus
Summary: REGRESSION (NativeTextField): New text fields don't scroll to the beginning w...
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P1 Normal
Assignee: Darin Adler
URL:
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2006-03-31 09:51 PST by mitz
Modified: 2006-04-04 01:57 PDT (History)
0 users

See Also:


Attachments
patch with detailed change log and a layout test (15.07 KB, patch)
2006-04-01 01:23 PST, Darin Adler
no flags Details | Formatted Diff | Diff
patch to handle RTL case, including adding it to the test case (7.57 KB, patch)
2006-04-01 22:34 PST, Darin Adler
mjs: 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-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.