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

Side by Side Diff: chrome/browser/resources/settings/languages_page/languages_page.js

Issue 2811693004: MD Settings: Restore focus after exiting various subpages. (Closed)
Patch Set: More Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 'settings-languages-page' is the settings page 6 * @fileoverview 'settings-languages-page' is the settings page
7 * for language and input method settings. 7 * for language and input method settings.
8 */ 8 */
9 cr.exportPath('settings'); 9 cr.exportPath('settings');
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 /** 52 /**
53 * The language to display the details for. 53 * The language to display the details for.
54 * @type {!LanguageState|undefined} 54 * @type {!LanguageState|undefined}
55 * @private 55 * @private
56 */ 56 */
57 detailLanguage_: Object, 57 detailLanguage_: Object,
58 58
59 /** @private */ 59 /** @private */
60 showAddLanguagesDialog_: Boolean, 60 showAddLanguagesDialog_: Boolean,
61
62 /** @private {?Map<string, string>} */
63 focusConfig_: Object,
64 },
65
66 /** @override */
67 ready: function() {
68 this.focusConfig_ = new Map();
69 // <if expr="not is_macosx">
Dan Beam 2017/04/11 02:23:56 fwiw: these will eventually get reformatted with `
70 this.focusConfig_.set(
71 settings.Route.EDIT_DICTIONARY.path,
72 '#spellCheckCollapse .subpage-arrow');
73 // </if>
74 // <if expr="chromeos">
75 this.focusConfig_.set(
76 settings.Route.INPUT_METHODS.path,
77 '#inputMethodsCollapse .subpage-arrow');
78 // </if>
61 }, 79 },
62 80
63 /** 81 /**
64 * Handler for enabling or disabling spell check. 82 * Handler for enabling or disabling spell check.
65 * @param {!{target: Element, model: !{item: !LanguageState}}} e 83 * @param {!{target: Element, model: !{item: !LanguageState}}} e
66 */ 84 */
67 onSpellCheckChange_: function(e) { 85 onSpellCheckChange_: function(e) {
68 var item = e.model.item; 86 var item = e.model.item;
69 if (!item.language.supportsSpellcheck) 87 if (!item.language.supportsSpellcheck)
70 return; 88 return;
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 if (e.target.tagName == expandButtonTag) 556 if (e.target.tagName == expandButtonTag)
539 return; 557 return;
540 558
541 /** @type {!CrExpandButtonElement} */ 559 /** @type {!CrExpandButtonElement} */
542 var expandButton = e.currentTarget.querySelector(expandButtonTag); 560 var expandButton = e.currentTarget.querySelector(expandButtonTag);
543 assert(expandButton); 561 assert(expandButton);
544 expandButton.expanded = !expandButton.expanded; 562 expandButton.expanded = !expandButton.expanded;
545 }, 563 },
546 }); 564 });
547 })(); 565 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698