Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12
-
None
-
-
10b8ed816d0dff4321d5a8b0723a8090b2058678 (qt/qtbase/5.12)
Description
In WebAssembly applications, the mouse wheel event doesn't trigger scene redraws, at least not until the mouse is moved in XY too.
Here is an example application that displays the wheel-y-delta on wheel events:
import QtQuick 2.11 import QtQuick.Window 2.11 Window { visible: true width: 640 height: 480 title: "Test" Text { id: label anchors.centerIn: parent text: "Test mouse wheel" } MouseArea { anchors.fill: parent property real wheelSum: 0 onWheel: { var dy = wheel.angleDelta.y; wheelSum += dy; label.text = "Wheel:\n" + "dy = " + dy + ((dy > 0) ? " (up)" : " (down)") + "\nsum = " + wheelSum; } } }
In Firefox and Chrome (on Ubuntu 18.04) the scene does not update on wheel event when holding the mouse steady. When moving the mouse at some later time, the scene is updated and eventually shows the changes the wheel event should have triggered.
Also, note that the wheel direction (up / down) is inverted when comparing the wasm application to the native application (as previously reported for IOS in QTBUG-69004). There are differences in wheel amplitude, but I assume those are a bit arbitrary across systems anyway.