Hiding tooltips on scroll

master
Emanuel Kluge 2015-07-06 22:53:12 +02:00
parent 27bc9244ed
commit 8ec124c35f
1 changed files with 2 additions and 0 deletions

View File

@ -64,6 +64,7 @@ MaterialTooltip.prototype.handleMouseEnter_ = function(event) {
this.element_.style.marginLeft = -1 * (this.element_.offsetWidth / 2) + 'px';
this.element_.style.top = props.top + props.height + 10 + 'px';
this.element_.classList.add(this.CssClasses_.IS_ACTIVE);
window.addEventListener('scroll', this.boundMouseLeaveHandler, false);
};
/**
@ -76,6 +77,7 @@ MaterialTooltip.prototype.handleMouseLeave_ = function(event) {
event.stopPropagation();
this.element_.classList.remove(this.CssClasses_.IS_ACTIVE);
window.removeEventListener('scroll', this.boundMouseLeaveHandler);
};
/**