Browse Source
Fixed number input value does not persist when using up/down arrows, Fixes #6012 (#6013)
Fixed number input value does not persist when using up/down arrows
pull/6021/head
aswinkumar863
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
-
src/domain_abstract/ui/InputNumber.ts
|
|
|
@ -140,7 +140,7 @@ export default class InputNumber extends Input { |
|
|
|
upArrowClick() { |
|
|
|
const { model } = this; |
|
|
|
const step = model.get('step'); |
|
|
|
let value = parseFloat(model.get('value')); |
|
|
|
let value = parseFloat(this.getInputEl().value); |
|
|
|
this.setValue(this.normalizeValue(value + step)); |
|
|
|
this.elementUpdated(); |
|
|
|
} |
|
|
|
@ -151,7 +151,7 @@ export default class InputNumber extends Input { |
|
|
|
downArrowClick() { |
|
|
|
const { model } = this; |
|
|
|
const step = model.get('step'); |
|
|
|
const value = parseFloat(model.get('value')); |
|
|
|
const value = parseFloat(this.getInputEl().value); |
|
|
|
this.setValue(this.normalizeValue(value - step)); |
|
|
|
this.elementUpdated(); |
|
|
|
} |
|
|
|
|