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.
This issue has been filed as<rdar://problem/4604703>
The cause of this is code in WebHTMLView.m that doesn't return YES from acceptsFirstResponder. Should be easy to fix.
Created attachment 9078 [details] reduction
Created attachment 9079 [details] patch, with change log but no test
Seems that a fix was checked in r15419, but this defect has not been updated.
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.
I backed out my original change and checked in Darin's. Committed revision 15430.