Skip to content

Commit 8f1ea1e

Browse files
authored
Update form-spinbutton.js
1 parent 2de4564 commit 8f1ea1e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/form-spinbutton/form-spinbutton.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export const BFormSpinbutton = /*#__PURE__*/ Vue.extend({
212212
value = toFloat(value) // Will be NaN if null
213213
this.localValue = isNaN(value) ? null : value
214214
},
215-
localValue(value) /* istanbul ignore next: until tests are ready */ {
215+
localValue(value) {
216216
this.$emit('input', value)
217217
},
218218
disabled(disabled) /* istanbul ignore next */ {
@@ -308,12 +308,14 @@ export const BFormSpinbutton = /*#__PURE__*/ Vue.extend({
308308
},
309309
onKeydown(evt) {
310310
const { keyCode, altKey, ctrlKey, metaKey } = evt
311+
/* istanbul ignore if */
311312
if (this.disabled || this.readonly || altKey || ctrlKey || metaKey) {
312313
return
313314
}
314315
if (arrayIncludes([UP, DOWN, HOME, END, PAGEUP, PAGEDOWN], keyCode)) {
315316
// https://w3c.github.io/aria-practices/#spinbutton
316317
evt.preventDefault()
318+
/* istanbul ignore if */
317319
if (this.$_keyIsDown) {
318320
// keypress already in progress
319321
return
@@ -344,6 +346,7 @@ export const BFormSpinbutton = /*#__PURE__*/ Vue.extend({
344346
onKeyup(evt) {
345347
// Emit a change event when the keyup happens
346348
const { keyCode, altKey, ctrlKey, metaKey } = evt
349+
/* istanbul ignore if */
347350
if (this.disabled || this.readonly || altKey || ctrlKey || metaKey) {
348351
return
349352
}

0 commit comments

Comments
 (0)