Use CSS to prevent pull-to-refresh in Chrome
This commit is contained in:
parent
e3b2bd1bf2
commit
606259e8ec
|
@ -50,6 +50,7 @@ a:link.fileLink, a:visited.fileLink {
|
|||
|
||||
body {
|
||||
background-color: black;
|
||||
overscroll-behavior-y: contain;
|
||||
}
|
||||
|
||||
#terminal {
|
||||
|
|
|
@ -31,11 +31,11 @@ export const emptyFunction = () => {
|
|||
export function addOnLoad(fun: () => void): void {
|
||||
const oldOnLoad = window.onload || emptyFunction;
|
||||
|
||||
window.onload = (() => {
|
||||
window.onload = () => {
|
||||
// @ts-ignore: Call works without parameters as well
|
||||
oldOnLoad();
|
||||
fun();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -67,8 +67,6 @@ export class Terminal {
|
|||
scrollStartPosition = event.changedTouches[0].clientY;
|
||||
}, {passive: true});
|
||||
this.terminal.addEventListener("touchmove", (event: TouchEvent) => {
|
||||
event.preventDefault();
|
||||
|
||||
const newPosition = event.changedTouches[0].clientY;
|
||||
const diff = scrollStartPosition - newPosition;
|
||||
if (Math.abs(diff) < this.lineHeight)
|
||||
|
|
Loading…
Reference in New Issue