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

Side by Side Diff: chrome/browser/resources/settings/about_page/detailed_build_info.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
« no previous file with comments | « no previous file | chrome/browser/resources/settings/bluetooth_page/bluetooth_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-detailed-build-info' contains detailed build 6 * @fileoverview 'settings-detailed-build-info' contains detailed build
7 * information for ChromeOS. 7 * information for ChromeOS.
8 */ 8 */
9 9
10 Polymer({ 10 Polymer({
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 /** 49 /**
50 * @param {string} version 50 * @param {string} version
51 * @return {boolean} 51 * @return {boolean}
52 * @private 52 * @private
53 */ 53 */
54 shouldShowVersion_: function(version) { 54 shouldShowVersion_: function(version) {
55 return version.length > 0; 55 return version.length > 0;
56 }, 56 },
57 57
58 /** @private */ 58 /**
59 onChangeChannelTap_: function() { 59 * @param {!Event} e
60 * @private
61 */
62 onChangeChannelTap_: function(e) {
63 e.preventDefault();
60 this.showChannelSwitcherDialog_ = true; 64 this.showChannelSwitcherDialog_ = true;
61 // Async to wait for dialog to appear in the DOM. 65 // Async to wait for dialog to appear in the DOM.
62 this.async(function() { 66 this.async(function() {
63 var dialog = this.$$('settings-channel-switcher-dialog'); 67 var dialog = this.$$('settings-channel-switcher-dialog');
64 // Register listener to detect when the dialog is closed. Flip the boolean 68 // Register listener to detect when the dialog is closed. Flip the boolean
65 // once closed to force a restamp next time it is shown such that the 69 // once closed to force a restamp next time it is shown such that the
66 // previous dialog's contents are cleared. 70 // previous dialog's contents are cleared.
67 dialog.addEventListener('close', function() { 71 dialog.addEventListener('close', function() {
68 this.showChannelSwitcherDialog_ = false; 72 this.showChannelSwitcherDialog_ = false;
69 }.bind(this)); 73 }.bind(this));
70 }.bind(this)); 74 }.bind(this));
71 }, 75 },
72 }); 76 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698