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

Side by Side Diff: chrome/browser/resources/options/options_page.js

Issue 23039009: Settings: Profile name text field should have focus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.define('options', function() { 5 cr.define('options', function() {
6 /** @const */ var FocusOutlineManager = cr.ui.FocusOutlineManager; 6 /** @const */ var FocusOutlineManager = cr.ui.FocusOutlineManager;
7 7
8 ///////////////////////////////////////////////////////////////////////////// 8 /////////////////////////////////////////////////////////////////////////////
9 // OptionsPage class: 9 // OptionsPage class:
10 10
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 } 276 }
277 277
278 // Update tab title. 278 // Update tab title.
279 this.setTitle_(overlay.title); 279 this.setTitle_(overlay.title);
280 280
281 // Change focus to the overlay if any other control was focused by keyboard 281 // Change focus to the overlay if any other control was focused by keyboard
282 // before. Otherwise, no one should have focus. 282 // before. Otherwise, no one should have focus.
283 if (document.activeElement != document.body) { 283 if (document.activeElement != document.body) {
284 if (FocusOutlineManager.forDocument(document).visible) { 284 if (FocusOutlineManager.forDocument(document).visible) {
285 overlay.focus(); 285 overlay.focus();
286 } else { 286 } else if (!overlay.pageDiv.contains(document.activeElement)) {
287 document.activeElement.blur(); 287 document.activeElement.blur();
288 } 288 }
289 } 289 }
290 290
291 $('searchBox').setAttribute('aria-hidden', true); 291 $('searchBox').setAttribute('aria-hidden', true);
292 292
293 if ($('search-field').value == '') { 293 if ($('search-field').value == '') {
294 var section = overlay.associatedSection; 294 var section = overlay.associatedSection;
295 if (section) 295 if (section)
296 options.BrowserOptions.scrollToSection(section); 296 options.BrowserOptions.scrollToSection(section);
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 canShowPage: function() { 982 canShowPage: function() {
983 return true; 983 return true;
984 }, 984 },
985 }; 985 };
986 986
987 // Export 987 // Export
988 return { 988 return {
989 OptionsPage: OptionsPage 989 OptionsPage: OptionsPage
990 }; 990 };
991 }); 991 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698