From 3516a85be34c73272ff999357331c394dba83eec Mon Sep 17 00:00:00 2001 From: Hannah Howard Date: Wed, 16 Sep 2015 19:09:22 -0700 Subject: [PATCH] fix(fabSpeekDial): remove keyboard handlers on scope destroy Closes #4681. --- src/components/fabSpeedDial/fabController.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/fabSpeedDial/fabController.js b/src/components/fabSpeedDial/fabController.js index d9a8af181b6..4178a4dd4c2 100644 --- a/src/components/fabSpeedDial/fabController.js +++ b/src/components/fabSpeedDial/fabController.js @@ -59,6 +59,9 @@ angular.forEach(eventTypes, function(eventType) { $element.off(eventType, parseEvents); }); + // remove any attached keyboard handlers in case element is removed while + // speed dial is open + disableKeyboard(); }); } @@ -323,4 +326,4 @@ return $element.find('md-fab-actions'); } } -})(); \ No newline at end of file +})();