[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
+1
View File
@@ -7,6 +7,7 @@ A cute, feature-rich file listing module to replace nginx's autoindex / fancyind
* [x] List files
* [x] Show file icons
* [x] Clickable, length-safe breadcrumb path
**TODO**
+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))
}