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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_mac.mm

Issue 113922: Make sure that we're restoring focus to a valid subview. (with Rohit)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host_view_mac.mm
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_mac.mm (revision 16984)
+++ chrome/browser/renderer_host/render_widget_host_view_mac.mm (working copy)
@@ -455,8 +455,12 @@
}
- (BOOL)becomeFirstResponder {
+ if (![self superview]) {
pink (ping after 24hrs) 2009/05/28 12:35:23 I usually check [self window] when determining if
+ // We're dead, so becoming first responder is probably a bad idea.
+ return NO;
+ }
+
renderWidgetHostView_->render_widget_host_->Focus();
-
return YES;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698