From f0821878445b17b853e3b5c0e1e8d31f071857c9 Mon Sep 17 00:00:00 2001 From: Sorin Davidoi Date: Thu, 25 Jan 2018 11:44:22 +0100 Subject: [PATCH] fix(theme/book): Use passive listeners for touchstart, touchmove (#575) --- src/theme/book.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/theme/book.js b/src/theme/book.js index f686af44..2fb48eff 100644 --- a/src/theme/book.js +++ b/src/theme/book.js @@ -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");