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

Unified Diff: chrome/browser/resources/options2/options_page.js

Issue 10388034: Disables the ability to tab to navigation items when an overlay is displayed. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Set aria-hidden=true when navigation is behind an overlay Created 8 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 | chrome/browser/resources/uber/uber.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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');
};
/**
« no previous file with comments | « no previous file | chrome/browser/resources/uber/uber.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698