From 5ed4a33adba0d9c8816703f45b2299fdcf8343cf Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Fri, 31 May 2013 19:24:41 -0700 Subject: [PATCH] Don't react to clicks on disabled button icons Fix gh-74 --- demo/app/component_ui/mail_controls.js | 3 +-- demo/app/component_ui/with_select.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/demo/app/component_ui/mail_controls.js b/demo/app/component_ui/mail_controls.js index 2c928ca..fb622e2 100644 --- a/demo/app/component_ui/mail_controls.js +++ b/demo/app/component_ui/mail_controls.js @@ -52,12 +52,11 @@ define( }; this.after('initialize', function() { - this.on('click', { + this.on('.mail-action', 'click', { 'deleteControlSelector': this.deleteMail, 'moveControlSelector': this.moveMail, 'forwardControlSelector': this.forwardMail, 'replyControlSelector': this.replyToMail - }); this.on(document, 'uiMailItemSelectionChanged', this.restyleOnSelectionChange); this.on(document, 'uiFolderSelectionChanged', this.disableAll); diff --git a/demo/app/component_ui/with_select.js b/demo/app/component_ui/with_select.js index adc8cce..2a99fea 100644 --- a/demo/app/component_ui/with_select.js +++ b/demo/app/component_ui/with_select.js @@ -15,7 +15,7 @@ define( this.initializeSelections = function() { this.select('selectedItemSelector').toArray().forEach(function(el) { this.attr.selectedIds.push(el.getAttribute('id')); - },this); + }, this); }; this.getSelectedIds = function() {