Index: chrome/browser/resources/options2/options_page.js |
diff --git a/chrome/browser/resources/options2/options_page.js b/chrome/browser/resources/options2/options_page.js |
index 45b485422bc41e9a88703e021a3e93a969887a95..11b16074530ff587cbefaf71f7b4397395840414 100644 |
--- a/chrome/browser/resources/options2/options_page.js |
+++ b/chrome/browser/resources/options2/options_page.js |
@@ -251,6 +251,12 @@ cr.define('options', function() { |
this.setTitle_(overlay.title); |
// Try to focus the first element of the new overlay. |
options.FocusManager.getInstance().focusFirstElement(); |
+ // Although FocusManager will correct erroneous focus in the settings frame, |
+ // it only runs in that <iframe>, so it cannot ensure proper focus in the |
+ // Uber frame where the navigation items reside. Thus, disable the ability |
+ // for those items to be focused to prevent them from receiving focus in a |
+ // page "behind" the overlay. |
+ uber.invokeMethodOnParent('disableNavigationItemTabbing'); |
Evan Stade
2012/05/08 23:23:00
this shouldn't be necessary. Just piggy back on be
Kyle Horimoto
2012/05/08 23:44:18
Done.
|
return true; |
}; |
@@ -299,6 +305,11 @@ cr.define('options', function() { |
var currentPage = this.getTopmostVisiblePage(); |
if (currentPage.lastFocusedElement) |
currentPage.lastFocusedElement.focus(); |
+ |
+ // If the last overlay has just been closed, there is no longer an overlay |
+ // to block the navigation elements, so allow them to receive focus. |
+ if (!this.isOverlayVisible_()) |
+ uber.invokeMethodOnParent('enableNavigationItemTabbing'); |
}; |
/** |