From 3cd74e393090d948a9c3f7ef43f2df6743cc8328 Mon Sep 17 00:00:00 2001 From: Emanuel Kluge Date: Tue, 7 Jul 2015 09:06:17 +0200 Subject: [PATCH] Hiding tooltips on touchmove --- src/tooltip/tooltip.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index 595019df..7e5ee4e1 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -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); }; /**