angular-strap icon indicating copy to clipboard operation
angular-strap copied to clipboard

Update bs-show after clicking outside the tooltip

Open hugovlc opened this issue 11 years ago • 3 comments

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.

hugovlc avatar Sep 25 '15 13:09 hugovlc

Duplicate of #1351

vmlf01 avatar Nov 03 '15 15:11 vmlf01

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.

stale[bot] avatar Jan 26 '19 04:01 stale[bot]

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.

lock[bot] avatar May 05 '19 22:05 lock[bot]