Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 34dfff4

Browse files
refactor(tooltip): remove work-arround for AngularJS 1.0.x bug
1 parent 4a28092 commit 34dfff4

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/tooltip/tooltip.js

+3-8
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
117117
var popupTimeout;
118118
var appendToBody = angular.isDefined( options.appendToBody ) ? options.appendToBody : false;
119119
var triggers = getTriggers( undefined );
120-
var hasRegisteredTriggers = false;
121120
var hasEnableExp = angular.isDefined(attrs[prefix+'Enable']);
122121

123122
var positionTooltip = function (){
@@ -299,11 +298,9 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
299298
scope.tt_popupDelay = ! isNaN(delay) ? delay : options.popupDelay;
300299
});
301300

302-
var unregisterTriggers = function() {
303-
if (hasRegisteredTriggers) {
304-
element.unbind( triggers.show, showTooltipBind );
305-
element.unbind( triggers.hide, hideTooltipBind );
306-
}
301+
var unregisterTriggers = function () {
302+
element.unbind(triggers.show, showTooltipBind);
303+
element.unbind(triggers.hide, hideTooltipBind);
307304
};
308305

309306
attrs.$observe( prefix+'Trigger', function ( val ) {
@@ -317,8 +314,6 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
317314
element.bind( triggers.show, showTooltipBind );
318315
element.bind( triggers.hide, hideTooltipBind );
319316
}
320-
321-
hasRegisteredTriggers = true;
322317
});
323318

324319
var animation = scope.$eval(attrs[prefix + 'Animation']);

0 commit comments

Comments
 (0)