var titleHeight = ~~styles.height.replace(/px$/, '');
if (titleHeight === 0) {
// firefox returns garbage for pseudo element height
- // https://bugzilla.mozilla.org/show_bug.cgi?id=925694#c7
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=925694
titleHeight = element.scrollHeight;
element.classList.add('redactorCalcHeight');
_tooltip = elCreate('div');
elAttr(_tooltip, 'id', 'balloonTooltip');
_tooltip.classList.add('balloonTooltip');
+ _tooltip.addEventListener('transitionend', function () {
+ if (!_tooltip.classList.contains('active')) {
+ // reset back to the upper left corner, prevent it from staying outside
+ // the viewport if the body overflow was previously hidden
+ _tooltip.style.removeProperty('top');
+ _tooltip.style.removeProperty('left');
+ }
+ });
_text = elCreate('span');
elAttr(_text, 'id', 'balloonTooltipText');
*/
_mouseLeave: function() {
_tooltip.classList.remove('active');
-
- // reset back to the upper left corner, prevent it from staying outside
- // the viewport if the body overflow was previously hidden
- _tooltip.style.removeProperty('top');
- _tooltip.style.removeProperty('left');
}
};
});