Hiding tooltips on touchmove

master
Emanuel Kluge 2015-07-07 09:06:17 +02:00
parent 8ec124c35f
commit 3cd74e3930
1 changed files with 2 additions and 0 deletions

View File

@ -65,6 +65,7 @@ MaterialTooltip.prototype.handleMouseEnter_ = function(event) {
this.element_.style.top = props.top + props.height + 10 + 'px';
this.element_.classList.add(this.CssClasses_.IS_ACTIVE);
window.addEventListener('scroll', this.boundMouseLeaveHandler, false);
window.addEventListener('touchmove', this.boundMouseLeaveHandler, false);
};
/**
@ -78,6 +79,7 @@ MaterialTooltip.prototype.handleMouseLeave_ = function(event) {
event.stopPropagation();
this.element_.classList.remove(this.CssClasses_.IS_ACTIVE);
window.removeEventListener('scroll', this.boundMouseLeaveHandler);
window.removeEventListener('touchmove', this.boundMouseLeaveHandler, false);
};
/**