Bug 9625 - REGRESSION: Focus is not removed from password field after I ctrl-click into a different field
Summary: REGRESSION: Focus is not removed from password field after I ctrl-click into ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Critical
Assignee: Nobody
URL:
Keywords: EasyFix, HasReduction, InRadar
Depends on:
Blocks:
 
Reported: 2006-06-27 16:49 PDT by Chris Petersen
Modified: 2006-07-14 12:04 PDT (History)
3 users (show)

See Also:


Attachments
reduction (148 bytes, text/html)
2006-06-28 09:00 PDT, Darin Adler
no flags Details
patch, with change log but no test (1.48 KB, patch)
2006-06-28 09:01 PDT, Darin Adler
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Petersen 2006-06-27 16:49:58 PDT
If I have focus in a password type field and ctrl-click on another input field, focus is not removed from the password field. I will then have TWO fields that have a focus ring and a flashing caret.

* STEPS TO REPRODUCE
1. With a TOT webkit nightly build, go to any site that includes both a input text field and password field. (like gmail)
2. Place the caret into the password field 
3. Ctrl-click into the input text field and mouse up (don't select anything in the contextual menu).
4. Notice that focus is placed on the input field but not removed from password field.

* RESULTS
Focus should removed from the password field but isn't.

* REGRESSION
Yes, this only happens with native text fields.
Comment 1 Chris Petersen 2006-06-27 16:52:53 PDT
This issue has been filed as<rdar://problem/4604703>
Comment 2 Darin Adler 2006-06-28 08:54:06 PDT
The cause of this is code in WebHTMLView.m that doesn't return YES from acceptsFirstResponder. Should be easy to fix.
Comment 3 Darin Adler 2006-06-28 09:00:46 PDT
Created attachment 9078 [details]
reduction
Comment 4 Darin Adler 2006-06-28 09:01:13 PDT
Created attachment 9079 [details]
patch, with change log but no test
Comment 5 David Carson 2006-07-14 04:44:40 PDT
Seems that a fix was checked in r15419, but this defect has not been updated.
Comment 6 David Carson 2006-07-14 04:56:33 PDT
Comment from svn log. rdar number matches this bug. Marking as fixed

r15419 | adele | 2006-07-14 02:48:17 -0400 (Fri, 14 Jul 2006) | 13 lines

        Reviewed by Maciej.

        - Fix for <rdar://problem/4604703> 
        REGRESSION (NativeTextField): Focus is not removed from password field after I ctrl-click into a different field

        Test:
        * manual-tests/password-ctrl-click-lose-focus.html: Added.

        * bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
        If we're about to set a selection in the current view, make sure its the first responder.
        In this case, this will cause the password field to resign first responder at the right time.
Comment 7 Adele Peterson 2006-07-14 12:04:14 PDT
I backed out my original change and checked in Darin's.

Committed revision 15430.