Skip to content

Commit

Permalink
[tooltip] Fix #3900 (preventDefault for tooltip)
Browse files Browse the repository at this point in the history
  • Loading branch information
100pah committed Sep 26, 2016
1 parent f2c19e7 commit 505063f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/component/tooltip/TooltipContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,14 @@ define(function (require) {
function compromiseMobile(tooltipContentEl, container) {
// Prevent default behavior on mobile. For example,
// default pinch gesture will cause browser zoom.
// We do not preventing event on tooltip contnet el,
// We do not preventing event on tooltip content el,
// because user may need customization in tooltip el.
eventUtil.addEventListener(container, 'touchstart', preventDefault);
eventUtil.addEventListener(container, 'touchmove', preventDefault);
eventUtil.addEventListener(container, 'touchend', preventDefault);

function preventDefault(e) {
if (contains(e.target)) {
if (!contains(e.target)) {
e.preventDefault();
}
}
Expand Down

0 comments on commit 505063f

Please sign in to comment.