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

Unified Diff: chrome/browser/resources/options2/chromeos/network_list.js

Issue 10174013: Fix scrolling of network menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options2/chromeos/network_list.js
diff --git a/chrome/browser/resources/options2/chromeos/network_list.js b/chrome/browser/resources/options2/chromeos/network_list.js
index 4f28970ccb3f6093e1b86faf9b662bcb78215900..0526cd71a53e678f86da221333b19cf7c635b3d3 100644
--- a/chrome/browser/resources/options2/chromeos/network_list.js
+++ b/chrome/browser/resources/options2/chromeos/network_list.js
@@ -292,10 +292,6 @@ cr.define('options.network', function() {
buttonLabel.textContent = entry.label;
button.appendChild(buttonLabel);
button.addEventListener('click', entry.command);
- button.addEventListener('mousedown', function(e) {
- // Prevent blurring of list, which would close the menu.
- e.preventDefault();
- });
MenuItem.decorate(button);
menu.appendChild(button);
}
@@ -315,6 +311,10 @@ cr.define('options.network', function() {
if (existing)
closeMenu_();
this.menu_ = this.createMenu();
+ this.menu_.addEventListener('mousedown', function(e) {
+ // Prevent blurring of list, which would close the menu.
+ e.preventDefault();
+ }, true);
var parent = $('network-menus');
if (existing)
parent.replaceChild(this.menu_, existing);
@@ -570,15 +570,10 @@ cr.define('options.network', function() {
closeMenu_();
};
}
- if (callback != null) {
+ if (callback != null)
button.addEventListener('click', callback);
- button.addEventListener('mousedown', function(e) {
- // Prevent blurring of list, which would close the menu.
- e.preventDefault();
- });
- } else {
+ else
buttonLabel.classList.add('network-disabled-control');
- }
MenuItem.decorate(button);
menu.appendChild(button);
return button;
« 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