From 427f53f905e7e03203e806aac37e89fa4de6c16b Mon Sep 17 00:00:00 2001 From: mertsincan Date: Thu, 26 Nov 2020 10:11:04 +0300 Subject: [PATCH] Fixed #675 - Add the 'enter' key support to InputNumber --- src/components/inputnumber/InputNumber.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/inputnumber/InputNumber.vue b/src/components/inputnumber/InputNumber.vue index 863bccc6e..48f34cc3d 100755 --- a/src/components/inputnumber/InputNumber.vue +++ b/src/components/inputnumber/InputNumber.vue @@ -409,6 +409,14 @@ export default { } break; + //enter + case 13: + let newValue = this.validateValue(this.parseValue(this.$refs.input.$el.value)); + this.$refs.input.$el.value = this.formatValue(newValue); + this.$refs.input.$el.setAttribute('aria-valuenow', newValue); + this.updateModel(event, newValue); + break; + //backspace case 8: { event.preventDefault();