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

Side by Side Diff: chrome/browser/resources/settings/reset_page/reset_profile_banner.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 6 * @fileoverview
7 * 'settings-reset-profile-banner' is the banner shown for clearing profile 7 * 'settings-reset-profile-banner' is the banner shown for clearing profile
8 * settings. 8 * settings.
9 */ 9 */
10 Polymer({ 10 Polymer({
11 is: 'settings-reset-profile-banner', 11 is: 'settings-reset-profile-banner',
12 12
13 properties: { 13 properties: {
14 showResetProfileDialog_: { 14 showResetProfileDialog_: {
15 type: Boolean, 15 type: Boolean,
16 value: false, 16 value: false,
17 }, 17 },
18 }, 18 },
19 19
20 /** @private */ 20 /** @private */
21 onCloseTap_: function() { 21 onCloseTap_: function() {
22 settings.ResetBrowserProxyImpl.getInstance().onHideResetProfileBanner(); 22 settings.ResetBrowserProxyImpl.getInstance().onHideResetProfileBanner();
23 this.remove(); 23 this.remove();
24 }, 24 },
25 25
26 /** 26 /**
27 * Shows a <settings-reset-profile-dialog>. 27 * Shows a <settings-reset-profile-dialog>.
28 * @param {!Event} e
28 * @private 29 * @private
29 */ 30 */
30 showDialog_: function() { 31 showDialog_: function(e) {
32 e.preventDefault();
31 this.showResetProfileDialog_ = true; 33 this.showResetProfileDialog_ = true;
32 }, 34 },
33 35
34 /** @private */ 36 /** @private */
35 onDialogClose_: function() { 37 onDialogClose_: function() {
36 this.showResetProfileDialog_ = false; 38 this.showResetProfileDialog_ = false;
37 }, 39 },
38 }); 40 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698