This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.
Hide the tooltip when its content becomes empty #875
Closed
Description
When the tooltip's content becomes empty (set to null
), if the tooltip is currently open I think it should be closed. This is related to closed issue #129 , but it's different than the original issue and wasn't addressed in 030901e.
Here is my suggested modification to tooltip.js
attrs.$observe( type, function ( val ) {
if ( !val && scope.tt_isOpen ) {
hide();
if ( angular.isDefined( scope.tt_animation ) && scope.tt_animation() ) {
transitionTimeout = $timeout( function () { scope.tt_content = val; }, 500 );
} else {
scope.tt_content = val;
}
} else {
scope.tt_content = val;
}
});
Without the if
/else
statement the tooltip will momentarily become blank before hiding.
UPDATE (8/25): Added transitionTimeout
conditional statement.