Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Issue 113751: Don't make |field_| first responder in SetSelectedRange() unless |model_| has_focus already. (Closed)

Created:
11 years, 7 months ago by Scott Hess - ex-Googler
Modified:
9 years, 6 months ago
Reviewers:
John Grabowski
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Don't make |field_| first responder in SetSelectedRange() unless |model_| has_focus already. http://crbug.com/11920 TEST=Browser to www.google.com, focus is in search field, bring up new tab, click back to first tab, focus should be in search field. TEST=Select messages in gmail, focus should NOT go to autocomplete field (omnibox, url bar).

Patch Set 1 #

Patch Set 2 : Not-enabled attempt to fix getting focus when we're actually supposed to. #

Total comments: 2

Patch Set 3 : Comment wordsmithing. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -19 lines) Patch
M chrome/browser/autocomplete/autocomplete_edit_view_mac.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/autocomplete/autocomplete_edit_view_mac.mm View 1 2 4 chunks +28 lines, -18 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Scott Hess - ex-Googler
As noted in the bug, I had this part of the fix but was trying ...
11 years, 7 months ago (2009-05-22 23:16:48 UTC) #1
John Grabowski
LGTM In the bigger picture, it would be nice if all the focus rules were ...
11 years, 7 months ago (2009-05-22 23:32:18 UTC) #2
Scott Hess - ex-Googler
11 years, 7 months ago (2009-05-23 00:10:26 UTC) #3
I'll try to write my understanding up somewhere once I have it.  Keeping
autocomplete selection right across tab-switching will probably require my brain
to contain that.

http://codereview.chromium.org/113751/diff/1003/1005
File chrome/browser/autocomplete/autocomplete_edit_view_mac.mm (right):

http://codereview.chromium.org/113751/diff/1003/1005#newcode290
Line 290: if (model_->has_focus()) {
On 2009/05/22 23:32:18, John Grabowski wrote:
> Logic of comment is opposite of conditional.
> Reading it at face value makes me think you are missing a !.
> Perhaps you can continue with an 
> // If it does, switch focus to the current window.

I dropped the comment entirely, the header-file comment for the function made
more sense.

Updated the TODO before FocusLocation(), as I think things are getting tighter
on that front, now.

Powered by Google App Engine
This is Rietveld 408576698