[O] Prevent scroll event propagation
This commit is contained in:
@@ -7,6 +7,7 @@ A cute, feature-rich file listing module to replace nginx's autoindex / fancyind
|
|||||||
|
|
||||||
* [x] List files
|
* [x] List files
|
||||||
* [x] Show file icons
|
* [x] Show file icons
|
||||||
|
* [x] Clickable, length-safe breadcrumb path
|
||||||
|
|
||||||
**TODO**
|
**TODO**
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,9 @@ export default function App() {
|
|||||||
// Handle wheel for breadcrumb
|
// Handle wheel for breadcrumb
|
||||||
function wheel(e: WheelEvent)
|
function wheel(e: WheelEvent)
|
||||||
{
|
{
|
||||||
|
e.preventDefault()
|
||||||
|
e.stopPropagation()
|
||||||
|
|
||||||
let direction = (e.detail < 0 || e.deltaY > 0) ? 1 : -1
|
let direction = (e.detail < 0 || e.deltaY > 0) ? 1 : -1
|
||||||
setBcLeft(clamp(bcLeft() + direction * 20, 0, bcMax))
|
setBcLeft(clamp(bcLeft() + direction * 20, 0, bcMax))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user