running-tools

A collection of tools for runners and their coaches
git clone https://git.ashermorgan.net/running-tools/
Log | Files | Refs | README

commit eecaa34958c61a637d0733b1d2d8fd6fdcc4ea81
parent dcfdf78c9e83534ac6f9fde2418ad9d25857e4fa
Author: ashermorgan <59518073+ashermorgan@users.noreply.github.com>
Date:   Wed, 19 Jul 2023 19:06:56 -0700

Fix keydown behavior in numeric input components

Diffstat:
Msrc/components/DecimalInput.vue | 3++-
Msrc/components/IntegerInput.vue | 3++-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/components/DecimalInput.vue b/src/components/DecimalInput.vue @@ -188,10 +188,11 @@ export default { if (this.arrowKeys) { if (e.key === 'ArrowUp') { this.decValue += this.step; + e.preventDefault(); } else if (e.key === 'ArrowDown') { this.decValue -= this.step; + e.preventDefault(); } - e.preventDefault(); } }, diff --git a/src/components/IntegerInput.vue b/src/components/IntegerInput.vue @@ -175,10 +175,11 @@ export default { if (this.arrowKeys) { if (e.key === 'ArrowUp') { this.intValue += this.step; + e.preventDefault(); } else if (e.key === 'ArrowDown') { this.intValue -= this.step; + e.preventDefault(); } - e.preventDefault(); } },