From ec33812b5234ac8451c5e3a05db2469e0760ad9b Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Thu, 19 Feb 2026 16:03:56 +0000 Subject: [PATCH] Capture up and down keys for incrimenting numerical property --- .../labThingsComponents/inputFromSchema.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/webapp/src/components/labThingsComponents/inputFromSchema.vue b/webapp/src/components/labThingsComponents/inputFromSchema.vue index e3ecbd3f..3b726b29 100644 --- a/webapp/src/components/labThingsComponents/inputFromSchema.vue +++ b/webapp/src/components/labThingsComponents/inputFromSchema.vue @@ -28,7 +28,6 @@ type="number" :min="minimum" :max="maximum" - @wheel="handleSpiner" @input="grabFocus" @focusout="focusOut" @keydown="keyDown" @@ -378,6 +377,17 @@ export default { if (event.keyCode == 13) { this.sendValue(); } + // If numeric then capture Up and Down keys for incrementing. + if (this.dataType === "number") { + if (event.key === "ArrowUp") { + event.preventDefault(); + this.increment(1); + } + if (event.key === "ArrowDown") { + event.preventDefault(); + this.increment(-1); + } + } }, updateIsEdited: function () { this.isEdited =