mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-08 21:55:54 +08:00
fix(pinch-to-zoom): Catch ctrl-scroll to prevent trackpad zoom
Fixes T2011
This commit is contained in:
parent
19d97e5393
commit
cac8b22b27
1 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue