Skip to content

Commit

Permalink
Fixed #537 - The 'disabled' option has no effect on InputNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Oct 9, 2020
1 parent 583aaa1 commit b83486b
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions src/components/inputnumber/InputNumber.vue
Original file line number Diff line number Diff line change
Expand Up @@ -304,37 +304,53 @@ export default {
this.handleOnInput(event, currentValue, newValue);
},
onUpButtonMouseDown(event) {
this.$refs.input.$el.focus();
this.repeat(event, null, 1);
event.preventDefault();
if (!this.$attrs.disabled) {
this.$refs.input.$el.focus();
this.repeat(event, null, 1);
event.preventDefault();
}
},
onUpButtonMouseUp() {
this.clearTimer();
if (!this.$attrs.disabled) {
this.clearTimer();
}
},
onUpButtonMouseLeave() {
this.clearTimer();
if (!this.$attrs.disabled) {
this.clearTimer();
}
},
onUpButtonKeyUp() {
this.clearTimer();
if (!this.$attrs.disabled) {
this.clearTimer();
}
},
onUpButtonKeyDown(event) {
if (event.keyCode === 32 || event.keyCode === 13) {
this.repeat(event, null, 1);
}
},
onDownButtonMouseDown(event) {
this.$refs.input.$el.focus();
this.repeat(event, null, -1);
event.preventDefault();
if (!this.$attrs.disabled) {
this.$refs.input.$el.focus();
this.repeat(event, null, -1);
event.preventDefault();
}
},
onDownButtonMouseUp() {
this.clearTimer();
if (!this.$attrs.disabled) {
this.clearTimer();
}
},
onDownButtonMouseLeave() {
this.clearTimer();
if (!this.$attrs.disabled) {
this.clearTimer();
}
},
onDownButtonKeyUp() {
this.clearTimer();
if (!this.$attrs.disabled) {
this.clearTimer();
}
},
onDownButtonKeyDown(event) {
if (event.keyCode === 32 || event.keyCode === 13) {
Expand Down

0 comments on commit b83486b

Please sign in to comment.