Skip to content

Error when scrolling with no-wheel attribute on a number b-form-input #7124

Open
@HarmvZ

Description

@HarmvZ

Describe the bug

Using the no-wheel attribute on a b-form-input component logs an error to the console when scrolling in the input. See the stale issue here: #6531

Steps to reproduce the bug

  1. Go to https://jsfiddle.net/7h6fk14u/3/
  2. Open your browser console.
  3. Click on the number input.
  4. Scroll
  5. See error in console:
    image

Link in error: https://chromestatus.com/feature/6662647093133312

Expected behavior

No error.

Versions

Libraries:

  • BootstrapVue: 2.23.0
  • Bootstrap: 4.6.1
  • Vue: 2.6.12 (also present in Vue 3)

Environment:

Demo link

https://jsfiddle.net/7h6fk14u/3/

Additional context

See https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#improving_scrolling_performance_with_passive_listeners. I suspect this can be fixed by explicitly passing the option passive: false here:

eventOn(document, 'wheel', this.stopWheel)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions