Capture up and down keys for incrimenting numerical property

This commit is contained in:
Julian Stirling 2026-02-19 16:03:56 +00:00
parent 484c7a757e
commit ec33812b52

View file

@ -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 =