mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-14 06:42:35 +00:00
fix(theme/book): Use passive listeners for touchstart, touchmove (#575)
This commit is contained in:
parent
6119972fa7
commit
f082187844
1 changed files with 2 additions and 2 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue