in modules/frontend/app/services/AngularStrapTooltip.decorator.js [30:73]
function TooltipFactoryDecorated(element, config) {
let tipElementEntered = false;
config.onShow = ($tooltip) => {
// Workaround for tooltip detection.
if ($tooltip.$element && $tooltip.$options.trigger === 'click hover') {
$tooltip.$element.on('mouseenter', () => tipElementEntered = true);
$tooltip.$element.on('mouseleave', () => {
tipElementEntered = false;
$tooltip.leave();
});
}
};
const $tooltip = $delegate(element, config);
const scope = $tooltip.$scope;
const options = $tooltip.$options;
const _hide = $tooltip.hide;
$tooltip.hide = (blur) => {
if (!$tooltip.$isShown || tipElementEntered)
return;
if ($tooltip.$element) {
$tooltip.$element.off('mouseenter');
$tooltip.$element.off('mouseleave');
return _hide(blur);
}
scope.$emit(options.prefixEvent + '.hide.before', $tooltip);
if (!_.isUndefined(options.onBeforeHide) && _.isFunction(options.onBeforeHide))
options.onBeforeHide($tooltip);
$tooltip.$isShown = scope.$isShown = false;
scope.$$phase || (scope.$root && scope.$root.$$phase) || scope.$digest();
};
return $tooltip;
}