Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Fixes placement bug for tooltips #1970

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/tooltip/tooltip.js
Expand Up @@ -166,8 +166,11 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.core', 'mgcrea.ngStrap

$tooltip.show = function() {
if (!options.bsEnabled || $tooltip.$isShown) return;

scope.$emit(options.prefixEvent + '.show.before', $tooltip);

// Destroy any existing element
if(tipElement) destroyTipElement();

var parent, after;
if (options.container) {
parent = tipContainer;
Expand All @@ -181,9 +184,6 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.core', 'mgcrea.ngStrap
after = element;
}


// Hide any existing tipElement
if(tipElement) destroyTipElement();
// Fetch a cloned element linked from template
tipScope = $tooltip.$scope.$new();
tipElement = $tooltip.$element = compileData.link(tipScope, function(clonedElement, scope) {});
Expand Down