playcanvas / pcui

UI component library for web-based tools
http://playcanvas.github.io/pcui
MIT License
663 stars 62 forks source link

`NumericInput` slider generates warning in Console on mouse wheel input #240

Closed willeastcott closed 1 year ago

willeastcott commented 1 year ago

Describe the bug Currently, the slider of a NumericInput generates the following warning when using the mouse wheel to adjust the element's value:

[Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

To Reproduce Steps to reproduce the behavior:

  1. Open the VectorInput example
  2. Open the Dev Tools and show the JS Console
  3. Left click a NumericInput slider and rotate the mouse wheel
  4. See warning printed to console
  5. Also notice that the value does not reliably change on rotating the mouse wheel

Expected behavior No warning is printed and the value changes fluidly on mouse wheel rotation.

Screenshots

passive