Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.8.0
-
None
-
Any tactile screen
Description
I found an asymmetrical behavior of the MouseArea between a classic mouse input and a tactile input.
I'm using a MouseArea to perform some action with the onClicked event, and to push something on a StackView with the onPressAndHold event.
In my example code, the MouseArea border is green when MouseArea.pressed is false, red when true.
While using a classic mouse input, everything works as intended.
While using a tactile input, the behavior of the MouseArea doesn't mirror the behavior of the classic mouse input, MouseArea.pressed is stuck to true, messing with the input.
Description of the intended behavior :
Using a classic mouse input
Press on the MouseArea, the pressed property is set to true, the border.color gets red.
Release on the MouseArea, the pressed property is set to false, the border.color gets green.
Click on the MouseArea, the doSomething function is called.
PressAndHold on the MouseArea, an other element is pushed on the StackView, Canceled event is trigger and MouseArea.pressed is reset to false.
Then go back to the previous Item in the StackView.
You can repeat the precedent actions over and over.
Description of the bugged behavior :
Using a tactile input
Press on the MouseArea, the pressed property is set to true, the border.color gets red.
Release on the MouseArea, the pressed property is set to false, the border.color gets green.
Click on the MouseArea, the doSomething function is called.
PressAndHold on the MouseArea, an other element is pushed on the StackView, Canceled event is not triggerred and MouseArea.pressed stays true.
Then go back to the previous Item in the StackView.
The MouseArea.pressed is stuck to true, every next Press or Click is directly seen as a PressAndHold by the MouseArea...
You cannot Click on the MouseArea anymore and call the doSomething function.