| Index: chrome/browser/resources/options/browser_options.js
|
| diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
|
| index c92fa1df42bc7c5c4bc0e7ca50512076fd3a49ad..f79eea4e5029a6782f70290ecee5dc152b01fa98 100644
|
| --- a/chrome/browser/resources/options/browser_options.js
|
| +++ b/chrome/browser/resources/options/browser_options.js
|
| @@ -127,11 +127,11 @@ cr.define('options', function() {
|
| $('advanced-settings'),
|
| $('advanced-settings-container'));
|
|
|
| - // If the link was focused (i.e., it was activated using the keyboard)
|
| - // and it was used to show the section (rather than hiding it), focus
|
| - // the first element in the container.
|
| - if (document.activeElement === $('advanced-settings-expander') &&
|
| - showAdvanced) {
|
| + // If the click was triggered using the keyboard and it showed the
|
| + // section (rather than hiding it), focus the first element in the
|
| + // container.
|
| + var manager = cr.ui.FocusOutlineManager.forDocument(document);
|
| + if (manager.visible && showAdvanced) {
|
| var focusElement = $('advanced-settings-container').querySelector(
|
| 'button, input, list, select, a[href]');
|
| if (focusElement)
|
|
|