Skip to content

Commit

Permalink
Fixed #562 - 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 14, 2020
1 parent a6fbcc6 commit 89d8b14
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 @@ -270,37 +270,53 @@ export default {
this.updateModel(event, 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 89d8b14

Please sign in to comment.