OLD | NEW |
| (Empty) |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 var FocusManager = cr.ui.FocusManager; | |
6 | |
7 /** | |
8 * A history-specific FocusManager implementation, which ensures that elements | |
9 * "background" pages (i.e., those in a dialog that is not the topmost overlay) | |
10 * do not receive focus. | |
11 * @constructor | |
12 * @extends {cr.ui.FocusManager} | |
13 */ | |
14 function HistoryFocusManager() { | |
15 } | |
16 | |
17 cr.addSingletonGetter(HistoryFocusManager); | |
18 | |
19 HistoryFocusManager.prototype = { | |
20 __proto__: FocusManager.prototype, | |
21 | |
22 /** @override */ | |
23 getFocusParent: function() { | |
24 return document.querySelector('#overlay .showing') || | |
25 document.querySelector('cr-menu:not([hidden])') || | |
26 $('history-page'); | |
27 }, | |
28 }; | |
OLD | NEW |