From 588e58cf6de9be13f77c820a1582f2d1a2c36cb0 Mon Sep 17 00:00:00 2001 From: Nicu Date: Wed, 15 Apr 2015 19:24:32 +0100 Subject: [PATCH] fix(mdList): remove focus state on blur Closes #2339. --- src/components/list/list.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/list/list.js b/src/components/list/list.js index 4f548101bd4..0b558149453 100644 --- a/src/components/list/list.js +++ b/src/components/list/list.js @@ -135,8 +135,8 @@ function mdListItemDirective($mdAria) { // Check for a secondary item and move it outside if ( secondaryItem && ( - secondaryItem.hasAttribute('ng-click') || - ( tAttrs.ngClick && + secondaryItem.hasAttribute('ng-click') || + ( tAttrs.ngClick && isProxiedElement(secondaryItem) ) )) { tEl.addClass('md-with-secondary'); @@ -162,9 +162,9 @@ function mdListItemDirective($mdAria) { proxy = angular.element(proxy); proxy.on('focus', function() { $element.addClass('md-focused'); - proxy.on('blur', function() { + proxy.on('blur', function proxyOnBlur() { $element.removeClass('md-focused'); - proxy.off('blur'); + proxy.off('blur', proxyOnBlur); }); }); }); @@ -180,7 +180,7 @@ function mdListItemDirective($mdAria) { } } function computeClickable() { - if (proxies.length || $element[0].firstElementChild.hasAttribute('ng-click')) { + if (proxies.length || $element[0].firstElementChild.hasAttribute('ng-click')) { $element.addClass('md-clickable'); } }