When a MouseArea is made visible, containsMouse is set to true if the mouse pointer is inside the MouseArea, even if the MouseArea is not enabled.
Test with the following reproduction code in qmlscene.
A Rectangle with a disabled MouseArea filling it is shown/hidden every 3000ms. If the mouse is inside the Rectangle when it is made visible, then mouseArea.containsMouse is true. I would expect that containsMouse is false in this case.
containsMouse does not change to false when moving the mouse out of the Rectangle in this state.
If the mouse is outside of the Rectangle when it is shown, then containsMouse will not change to true when moving the mouse over the Rectangle (which is as expected).
The problem also occurs if enabled: false is moved from the MouseArea to the Rectangle.
Tested with both 5.11.2 and 5.13.0 on Ubuntu 18.04.
|For Gerrit Dashboard: QTBUG-77983|
|274511,11||QQuickMouseArea: fix containsMouse when mousearea become visible||5.14||qt/qtdeclarative||Status: MERGED||+2||0|