Browse Source

Fix browser incrmenting numberInput by itself while scrolling

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
master
Florian Bouillon 1 month ago
parent
commit
854c5fae1e
Signed by: Avior <florian.bouillon@delta-wings.net> GPG Key ID: B143FF27EF555D16
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/modules/NumberInput.ts

+ 4
- 0
src/modules/NumberInput.ts View File

@@ -19,6 +19,10 @@ export default class NumberInput extends DefaultInput {
}
})

// Desactivate Wheel Event
element.addEventListener("wheel", (e: WheelEvent) => {
if (document.activeElement === this.element) e.preventDefault()
})
}

public formatValue(value: any): number|undefined {


Loading…
Cancel
Save