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

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

Issue 2793463002: MD Settings: Restore focus after closing various dialogs. (Closed)
Patch Set: Nits. 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
« no previous file with comments | « no previous file | chrome/browser/resources/settings/people_page/people_page.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 * @param {!Event} e 84 * @param {!Event} e
85 * @private 85 * @private
86 */ 86 */
87 onAddLanguagesTap_: function(e) { 87 onAddLanguagesTap_: function(e) {
88 e.preventDefault(); 88 e.preventDefault();
89 this.showAddLanguagesDialog_ = true; 89 this.showAddLanguagesDialog_ = true;
90 this.async(function() { 90 this.async(function() {
91 var dialog = this.$$('settings-add-languages-dialog'); 91 var dialog = this.$$('settings-add-languages-dialog');
92 dialog.addEventListener('close', function() { 92 dialog.addEventListener('close', function() {
93 this.showAddLanguagesDialog_ = false; 93 this.showAddLanguagesDialog_ = false;
94 this.$.addLanguages.focus();
94 }.bind(this)); 95 }.bind(this));
95 }); 96 });
96 }, 97 },
97 98
98 /** 99 /**
99 * Used to determine which "Move" buttons to show for ordering enabled 100 * Used to determine which "Move" buttons to show for ordering enabled
100 * languages. 101 * languages.
101 * @param {number} n 102 * @param {number} n
102 * @param {!LanguageState} language 103 * @param {!LanguageState} language
103 * @return {boolean} True if |language| is at the |n|th index in the list of 104 * @return {boolean} True if |language| is at the |n|th index in the list of
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 if (e.target.tagName == expandButtonTag) 538 if (e.target.tagName == expandButtonTag)
538 return; 539 return;
539 540
540 /** @type {!CrExpandButtonElement} */ 541 /** @type {!CrExpandButtonElement} */
541 var expandButton = e.currentTarget.querySelector(expandButtonTag); 542 var expandButton = e.currentTarget.querySelector(expandButtonTag);
542 assert(expandButton); 543 assert(expandButton);
543 expandButton.expanded = !expandButton.expanded; 544 expandButton.expanded = !expandButton.expanded;
544 }, 545 },
545 }); 546 });
546 })(); 547 })();
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/people_page/people_page.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698