wasm: fix natural scrolling on mac

Pick-to: 5.15
Change-Id: Icc41b2c54a2e8d0da11ba5068bdde1a0c20686e0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Lorn Potter 2020-08-05 09:56:09 +10:00
parent 6379b697a6
commit 20db9a0d7f

View File

@ -353,7 +353,7 @@ void QWasmEventTranslator::initEventHandlers()
if (platform == MacOSPlatform) {
g_useNaturalScrolling = false; // make this !default on macOS
if (emscripten::val::global("window")["safari"].isUndefined()) {
if (!emscripten::val::global("window")["safari"].isUndefined()) {
val canvas = screen()->canvas();
canvas.call<void>("addEventListener",
val("wheel"),