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

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

Issue 2557073003: Call preventDefault in all on-tap events that show a dialog. (Closed)
Patch Set: nit Created 4 years 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-startup-urls-page' is the settings page 6 * @fileoverview 'settings-startup-urls-page' is the settings page
7 * containing the urls that will be opened when chrome is started. 7 * containing the urls that will be opened when chrome is started.
8 */ 8 */
9 9
10 Polymer({ 10 Polymer({
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 }.bind(this)); 44 }.bind(this));
45 this.browserProxy_.loadStartupPages(); 45 this.browserProxy_.loadStartupPages();
46 46
47 this.addEventListener(settings.EDIT_STARTUP_URL_EVENT, function(event) { 47 this.addEventListener(settings.EDIT_STARTUP_URL_EVENT, function(event) {
48 this.startupUrlDialogModel_ = event.detail; 48 this.startupUrlDialogModel_ = event.detail;
49 this.showStartupUrlDialog_ = true; 49 this.showStartupUrlDialog_ = true;
50 event.stopPropagation(); 50 event.stopPropagation();
51 }.bind(this)); 51 }.bind(this));
52 }, 52 },
53 53
54 /** @private */ 54 /**
55 onAddPageTap_: function() { 55 * @param {!Event} e
56 * @private
57 */
58 onAddPageTap_: function(e) {
59 e.preventDefault();
56 this.showStartupUrlDialog_ = true; 60 this.showStartupUrlDialog_ = true;
57 }, 61 },
58 62
59 /** @private */ 63 /** @private */
60 destroyUrlDialog_: function() { 64 destroyUrlDialog_: function() {
61 this.showStartupUrlDialog_ = false; 65 this.showStartupUrlDialog_ = false;
62 this.startupUrlDialogModel_ = null; 66 this.startupUrlDialogModel_ = null;
63 }, 67 },
64 68
65 /** @private */ 69 /** @private */
66 onUseCurrentPagesTap_: function() { 70 onUseCurrentPagesTap_: function() {
67 this.browserProxy_.useCurrentPages(); 71 this.browserProxy_.useCurrentPages();
68 }, 72 },
69 }); 73 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698