fix: cleaning repo

This commit is contained in:
2026-04-22 12:44:10 +02:00
parent ce4cd6939a
commit 7de1fa2850
13 changed files with 78 additions and 10 deletions

View File

@ -2,6 +2,21 @@ import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
// Block all document-level scrolling
document.addEventListener("wheel", (e) => {
let el = e.target as HTMLElement | null;
while (el && el !== document.documentElement) {
const { overflowY } = window.getComputedStyle(el);
if (overflowY === "scroll" || overflowY === "auto") return;
el = el.parentElement;
}
e.preventDefault();
}, { passive: false });
document.addEventListener("scroll", () => {
window.scrollTo(0, 0);
}, { passive: true });
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<React.StrictMode>
<App />