fix(pinch-to-zoom): Catch ctrl-scroll to prevent trackpad zoom

Fixes T2011
This commit is contained in:
Ben Gotow 2015-06-19 11:55:08 -07:00
parent 19d97e5393
commit cac8b22b27

View file

@ -79,6 +79,13 @@ class WindowEventHandler
document.addEventListener 'keydown', @onKeydown
# "Pinch to zoom" on the Mac gets translated by the system into a
# "scroll with ctrl key down". To prevent the page from zooming in,
# prevent default when the ctrlKey is detected.
document.addEventListener 'mousewheel', ->
if event.ctrlKey
event.preventDefault()
document.addEventListener 'drop', @onDrop
@subscribe new Disposable =>
document.removeEventListener('drop', @onDrop)