angular-strap
angular-strap copied to clipboard
Update bs-show after clicking outside the tooltip
Currently after clicking outside the toolTip, when the autoClose is set to "1", the bs-show parameter is not updated:
In the method $tooltip.hide, the show variable must be toggled, something like this:
tooltip.hide = function(blur) {
if (!$tooltip.$isShown) return;
scope.$emit(options.prefixEvent + '.hide.before', $tooltip);
_blur = blur;
_tipToHide = tipElement;
if (angular.version.minor <= 2) {
$animate.leave(tipElement, leaveAnimateCallback);
} else {
$animate.leave(tipElement).then(leaveAnimateCallback);
}
$tooltip.$isShown = scope.$isShown = false;
safeDigest(scope);
if (options.keyboard && tipElement !== null) {
unbindKeyboardEvents();
}
if (options.autoClose && tipElement !== null) {
unbindAutoCloseEvents();
}
if (scope.$parent.$parent.show && options.autoClose && tipElement !== null) {
scope.$parent.$parent.show = !scope.$parent.$parent.show;
}
This worked for me.
Duplicate of #1351
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.