fix(theme/book): Use passive listeners for touchstart, touchmove (#575)

This commit is contained in:
Sorin Davidoi 2018-01-25 11:44:22 +01:00 committed by Michael Bryan
parent 6119972fa7
commit f082187844
1 changed files with 2 additions and 2 deletions

View File

@ -422,7 +422,7 @@ function playpen_text(playpen) {
x: e.touches[0].clientX,
time: Date.now()
};
});
}, { passive: true });
document.addEventListener('touchmove', function (e) {
if (!firstContact)
@ -440,7 +440,7 @@ function playpen_text(playpen) {
firstContact = null;
}
});
}, { passive: true });
// Scroll sidebar to current active section
var activeSection = sidebar.querySelector(".active");