[O] Prevent scroll event propagation

This commit is contained in:
Azalea Gui
2023-02-11 17:38:09 -05:00
parent 62c3585c2f
commit 9e79518e84
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -57,6 +57,9 @@ export default function App() {
// Handle wheel for breadcrumb
function wheel(e: WheelEvent)
{
e.preventDefault()
e.stopPropagation()
let direction = (e.detail < 0 || e.deltaY > 0) ? 1 : -1
setBcLeft(clamp(bcLeft() + direction * 20, 0, bcMax))
}