Skip to content

Instantly share code, notes, and snippets.

@NekR
Last active January 31, 2016 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NekR/9a80ebe73573e11f0351 to your computer and use it in GitHub Desktop.
Save NekR/9a80ebe73573e11f0351 to your computer and use it in GitHub Desktop.

Mac OS X browser scroll and zoom events

Chrome

  • Correct scrolling
  • pinch/zoom gesture on trackpack sends same wheel event as scroll events, but with ctrlKey set to true. Zoom level is detecteable via deltaY property (only when ctrlKey is set).
  • Real Ctrl + MouseWheel action doesn't fire any events and does nothing. Same for Cmd + MouseWheel

Firefox

  • Correct scrolling
  • pinch/zoom gesture does nothing. i.e. neither zoom is performed, nor wheel events are fired
  • Ctrl + MouseWheel as well as Cmd + MouseWheel does zoom a page and fires corrent wheel events too.

Safari (9.0.3)

  • Correct scrolling
  • pinch/zoom gesture does zoom a page, but doesn't fire any events to detect it or prevent
  • Ctrl + MouseWheel (and Cmd + MouseWheel) does nothing. No zoom. No events.
  • Safari 9.1 is reported to have built-in gesture events to detect zoom/rotation with Macbook's TrackPad.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment