Bug 18734 - REGRESSION (r31081): Focus problems in Gmail 2/Plain text message text
Summary: REGRESSION (r31081): Focus problems in Gmail 2/Plain text message text
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P1 Normal
Assignee: Darin Adler
URL: http://mail.google.com
Keywords: GoogleBug, InRadar, Regression
Depends on:
Blocks:
 
Reported: 2008-04-24 23:07 PDT by Ruben Bakker
Modified: 2008-12-13 15:02 PST (History)
1 user (show)

See Also:


Attachments
patch in progress -- needs regression tests (695 bytes, patch)
2008-12-12 17:11 PST, Darin Adler
no flags Details | Formatted Diff | Diff
patch (7.45 KB, patch)
2008-12-13 14:36 PST, Darin Adler
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ruben Bakker 2008-04-24 23:07:48 PDT
Summary:
When replying to a message in Gmail 2 using "Plain text" message text, focus will be lost when moving the mouse out of the message text. Only the first character typed will be entered at the beginning of the text, all others will appear at the end of the reply.

Steps to Reproduce: 
1. Log into gmail http://mail.google.com (make sure you have the new version (Gmail 2))
2. Compose a new message and click "Plain text", Gmail will set "Plain text" as your default
3. Cancel the new message to go back to your inbox
4. Open a conversation in your inbox
5. Click into the reply field to reply to the message
6. Before typing, move the mouse out of the message text - the caret will become invisible
7. Type some characters

Expected Results:
Focus remains in the message text, all characters are entered correctly

Actual Results:
- The first character will appear correctly all other characters will go to the end of the message
- The caret should stay visible in the reply field

Regression:
- Happens with Gmail 2 (the newer version)
- The problem can only be duplicated with "Plain text", "Rich text" works

Notes:
- The problem was introduced with ChangeSet http://trac.webkit.org/projects/webkit/changeset/31081 - by undoing this change, focus works correctly.
- The bug has been duplicated with WebKit 32531
Comment 1 David Kilzer (:ddkilzer) 2008-04-26 13:51:40 PDT
Confirmed with WebKit nightly build r32531.  Works correctly with Safari 3.1.1 on Mac OS X Leopard.

Thanks for the great bug report, Ruben, and finding where this regressed!

Comment 2 David Kilzer (:ddkilzer) 2008-04-26 13:54:59 PDT
<rdar://problem/5892415>
Comment 3 Darin Adler 2008-12-12 17:10:32 PST
I have a fix for this in my tree. Need to make some regression tests now.
Comment 4 Darin Adler 2008-12-12 17:11:47 PST
Created attachment 25993 [details]
patch in progress -- needs regression tests
Comment 5 Ruben Bakker 2008-12-13 04:34:56 PST
(In reply to comment #4)
> Created an attachment (id=25993) [review]
> patch in progress -- needs regression tests
> 
I am the bug reporter: I am not sure if you addressed me by this comment :)

BTW: There is a similar focus bug with Gmail 2/Rich text, someone reported this bug: https://bugs.webkit.org/show_bug.cgi?id=14925
Comment 6 Darin Adler 2008-12-13 11:27:03 PST
(In reply to comment #5)
> (In reply to comment #4)
> > Created an attachment (id=25993) [review] [review]
> > patch in progress -- needs regression tests
>
> I am the bug reporter: I am not sure if you addressed me by this comment :)

Nope. I'm going to make the regression tests myself. I just can't land the fix without tests. No worries. Nothing for you to do.

> BTW: There is a similar focus bug with Gmail 2/Rich text, someone reported this
> bug: https://bugs.webkit.org/show_bug.cgi?id=14925

OK. That's got a different cause.
Comment 7 Darin Adler 2008-12-13 14:36:12 PST
Created attachment 26005 [details]
patch
Comment 8 mitz 2008-12-13 14:39:49 PST
Comment on attachment 26005 [details]
patch

> +    ta.selectionStart = 3;
> +    ta.selectionEnd = 4;
> +    debug("- set selection so we can test again without a trailing newline");

For consistency with the other steps, you can print the debug message before performing the action.

r=me
Comment 9 Darin Adler 2008-12-13 15:02:29 PST
http://trac.webkit.org/changeset/39281