Skip to content

Commit fdc2df9

Browse files
committed
fix(tooltip): fix unregistering of dynamic tooltip triggers - fixes #124
1 parent e19fceb commit fdc2df9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/tooltip/tooltip.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,13 @@ angular.module( 'mm.foundation.tooltip', [ 'mm.foundation.position', 'mm.foundat
300300
});
301301

302302
var unregisterTriggers = function() {
303-
if (hasRegisteredTriggers) {
304-
element.unbind( triggers.show, showTooltipBind );
305-
element.unbind( triggers.hide, hideTooltipBind );
303+
if ( hasRegisteredTriggers ) {
304+
if ( angular.isFunction( triggers.show ) ) {
305+
unregisterTriggerFunction();
306+
} else {
307+
element.unbind( triggers.show, showTooltipBind );
308+
element.unbind( triggers.hide, hideTooltipBind );
309+
}
306310
}
307311
};
308312

0 commit comments

Comments
 (0)