This is a complicated scenario we face in our embedded wizard codebase (and stuck because of this issue). I will try to explain with an example scenario for easy understanding.
- In the Application view, we added a button. Upon clicking it, we "PresentDialog Screen1".
- Screen1 contains a button, upon clicking it, we "SwitchToDialog Screen2".
- In Application view, we have a timer for say 15 seconds. In the timer slot, we "PresentDialog Screen3".
The problem scenario is like, when the Application starts, we click the button, so that Screen 1 is presented.
Then we touch and hold the button on the Screen1. We do not release the touch until the timer is activated and Screen3 is presented.
When timer in the Application is activated and Screen3 is presented, we release the touch. Even though the button is in Screen1 and currently presented view is Screen3, the release slot of the button is triggered and screen switching from Screen1 to Screen2 happens. This results in the disappearing of Screen3.
This situation occurs because user touch and hold the button until next screen is displayed on top. When he releases the touch, the button release event is triggered on the currently behind screen (which actually should not happen as its not the active screen anymore).
I have a sample codebase explaining this scenario, but I do not know how to attach the zip folder in this forum.