Back to Chromium

When pointer is locked and preventDefault is called the wheel event has to be cancelable and no scrolling should occur

third_party/blink/web_tests/pointer-lock/wheel-event-cancelable.html

149.0.7827.2611 B
Original Source

When pointer is locked and preventDefault is called the wheel event has to be cancelable and no scrolling should occur

This example was taken from this SO question, and slightly modified. Steps:

  • Clicking this div locks pointer on it (it calls requestPointerLock)
  • After clicking this div, while pointer lock is in effect, wheel events should be cancelable, and preventDefault should work (i.e. scrolling is prevented)

Newest events at the top.
This log window should not scroll at all.