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

Unified Diff: chrome/browser/resources/shared/js/cr/ui/overlay.js

Issue 10444100: Implements a focus manager for the extensions page. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased 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 | « chrome/browser/resources/extensions/extensions.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/shared/js/cr/ui/overlay.js
diff --git a/chrome/browser/resources/shared/js/cr/ui/overlay.js b/chrome/browser/resources/shared/js/cr/ui/overlay.js
index b5959877b68a59a29985babc430a5e0320260892..056bf1ee7dd422a21769ca8e2f8333197b5f0d01 100644
--- a/chrome/browser/resources/shared/js/cr/ui/overlay.js
+++ b/chrome/browser/resources/shared/js/cr/ui/overlay.js
@@ -22,27 +22,6 @@ cr.define('cr.ui.overlay', function() {
* Makes initializations which must hook at the document level.
*/
function globalInitialization() {
- // Listen to focus events and make sure focus doesn't move outside of a
- // visible overlay .page.
- document.addEventListener('focus', function(e) {
- // Only run this event handler if there is no FocusManager.
- // TODO(khorimoto): Remove this function once FocusManager can be used
- // to manage focus on other pages besides the Settings page.
- // (https://code.google.com/p/chromium/issues/detail?id=127681)
- var focusManagerExists = options && options.OptionsFocusManager;
- if (focusManagerExists)
- return;
-
- var overlay = getTopOverlay();
- var page = overlay ? overlay.querySelector('.page:not([hidden])') : null;
- if (!page || page.contains(e.target))
- return;
-
- var focusElement = page.querySelector('button, input, list, select, a');
- if (focusElement)
- focusElement.focus();
- }, true);
-
// Close the overlay on escape.
document.addEventListener('keydown', function(e) {
if (e.keyCode == 27) { // Escape
« no previous file with comments | « chrome/browser/resources/extensions/extensions.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698