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

Unified Diff: chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js

Issue 2848973003: MD Settings: convert paper-icon-button to paper-icon-button-light. (Closed)
Patch Set: format Created 3 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
Index: chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js
diff --git a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js
index 5f0dee2bdde2c6d898c54f88284cb7e8b9f86980..41dde986a8c14c9342007718c4ab78122dfc3953 100644
--- a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js
+++ b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js
@@ -21,6 +21,23 @@ Polymer({
},
},
+ listeners: {
+ 'keydown': 'onKeyDown_',
+ },
+
+ /**
+ * This is necessary, otherwise pressing enter will first trigger iron-list's
+ * keydown handler and intefere with icon-button's on-tap behavior.
+ * @param {!Event} event
+ * @private
+ */
+ onKeyDown_: function(event) {
+ if (event.key == 'Enter' &&
+ Polymer.dom(event).rootTarget ==
+ this.$$('button[is="paper-icon-button-light"]'))
+ event.stopPropagation();
+ },
+
/**
* @param {!Event} event
* @private

Powered by Google App Engine
This is Rietveld 408576698