Skip to content

Commit

Permalink
Merge pull request #758 from jesusfreak3/popoverFix
Browse files Browse the repository at this point in the history
fix(textAngular): fix popover requires 2 clicks to hide
  • Loading branch information
pbassut committed Aug 19, 2015
2 parents a6b1a26 + fed6cca commit c7893dc
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,10 @@ textAngular.directive("textAngular", [
scope.displayElements.popoverArrow.css('margin-left', (Math.min(_targetLeft, (Math.max(0, _targetLeft - _maxLeft))) - 11) + 'px');
};
scope.hidePopover = function(){
/* istanbul ignore next: dosen't test with mocked animate */
var doneCb = function(){
scope.displayElements.popover.css('display', '');
scope.displayElements.popoverContainer.attr('style', '');
scope.displayElements.popoverContainer.attr('class', 'popover-content');
};
$q.when($animate.removeClass(scope.displayElements.popover, 'in', doneCb)).then(doneCb);
scope.displayElements.popover.css('display', '');
scope.displayElements.popoverContainer.attr('style', '');
scope.displayElements.popoverContainer.attr('class', 'popover-content');
scope.displayElements.popover.removeClass('in');
};

// setup the resize overlay
Expand Down

0 comments on commit c7893dc

Please sign in to comment.