File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/components/form-spinbutton Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -366,8 +366,6 @@ export const BFormSpinbutton = /*#__PURE__*/ Vue.extend({
366366 return
367367 }
368368 this . resetTimers ( )
369- // Enable body mouseup event handler
370- this . setMouseup ( true )
371369 // Step the counter initially
372370 stepper ( 1 )
373371 const threshold = this . computedThreshold
@@ -393,9 +391,10 @@ export const BFormSpinbutton = /*#__PURE__*/ Vue.extend({
393391 const { type, button } = evt || { }
394392 /* istanbul ignore if */
395393 if ( type === 'mouseup' && button ) {
396- // we only care about left (main === 0) mouse button click
394+ // Ignore non left button (main === 0) mouse button click
397395 return
398396 }
397+ evt . preventDefault ( )
399398 this . resetTimers ( )
400399 this . setMouseup ( false )
401400 // Trigger the change event
@@ -437,8 +436,10 @@ export const BFormSpinbutton = /*#__PURE__*/ Vue.extend({
437436 props : { scale : this . hasFocus ? 1.5 : 1.25 } ,
438437 attrs : { 'aria-hidden' : 'true' }
439438 } )
440- const handler = evt => /* istanbul ignore next: until tests written */ {
439+ const handler = evt => {
441440 if ( ! isDisabled && ! isReadonly ) {
441+ evt . preventDefault ( )
442+ this . setMouseup ( true )
442443 this . handleStepRepeat ( evt , stepper )
443444 }
444445 }
You can’t perform that action at this time.
0 commit comments