| 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;
|
|
|