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

Side by Side Diff: chrome/browser/resources/settings/on_startup_page/startup_url_entry.js

Issue 2782393004: MD Settings: Restore focus after closing dialogs, for startup page. (Closed)
Patch Set: Fix test. 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/on_startup_page/startup_urls_page.js » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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-startup-url-entry represents a UI component that 6 * @fileoverview settings-startup-url-entry represents a UI component that
7 * displayes a URL that is loaded during startup. It includes a menu that allows 7 * displayes a URL that is loaded during startup. It includes a menu that allows
8 * the user to edit/remove the entry. 8 * the user to edit/remove the entry.
9 */ 9 */
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 this.model.modelIndex); 48 this.model.modelIndex);
49 }, 49 },
50 50
51 /** 51 /**
52 * @param {!Event} e 52 * @param {!Event} e
53 * @private 53 * @private
54 */ 54 */
55 onEditTap_: function(e) { 55 onEditTap_: function(e) {
56 e.preventDefault(); 56 e.preventDefault();
57 this.$$('dialog[is=cr-action-menu]').close(); 57 this.$$('dialog[is=cr-action-menu]').close();
58 this.fire(settings.EDIT_STARTUP_URL_EVENT, this.model); 58 this.fire(settings.EDIT_STARTUP_URL_EVENT, {
59 model: this.model,
60 anchor: this.$$('#dots'),
61 });
59 }, 62 },
60 63
61 /** @private */ 64 /** @private */
62 onDotsTap_: function() { 65 onDotsTap_: function() {
63 var actionMenu = /** @type {!CrActionMenuElement} */( 66 var actionMenu = /** @type {!CrActionMenuElement} */(
64 this.$$('#menu').get()); 67 this.$$('#menu').get());
65 actionMenu.showAt(assert(this.$$('#dots'))); 68 actionMenu.showAt(assert(this.$$('#dots')));
66 }, 69 },
67 }); 70 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/on_startup_page/startup_urls_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698