question

GuangY avatar image
0 Votes"
GuangY asked GuangY commented

Windows 10 Touching Outside Modal Dialog Causes Unhandled 10th Touch Later

  • latest on Apr 12th --

I have found a easier way to reproduce the problem and realized there is a pattern, I also updated my code to reproduce it. Basically any outside the modal message box tap was not properly handled, which will cause a delayed non-response after 10 additional taps. Please see all the details in:
https://github.com/GuangSunshine/WpfTouchTest/blob/main/README.md

I also created a feedback using the Microsoft Feedback Hub app: https://aka.ms/AAbwiuw

  • original question, you may skip --

Hi I am creating some WPF based application on Windows 10, with a touch screen.

I found the following will cause the touch screen become unresponsive for a while:

  1. From my main window, click "Button 1" to pop up a modal message box (System.Windows.MessageBox.Show(this, "simple MessageBox", "test", MessageBoxButton.OKCancel); ). When this message box showing, tap quickly and repeatedly on the main window, this will cause the pop up message box to blink, then tap the "Close" button to close the message box.

  2. Now tap any button on the main window, the button turns blue, which means it gets the focus, but the button is not clicked. Keep on taping the same button, it takes another 10 taps to click the button.

  3. It looks to me that when I tap quickly and repeatedly on the main window (outside the modal message box), the touch events becomes backed up, or maybe it becomes a multi-finger touch or some other events, these events back up; the system might think there are 10 fingers on the screen now (my touch screen supports 10 touch points); then in the subsequent non-responsive touches, it clears the 10 fingers, so on the 11th touch, it comes back to normal and promoted the touch event to a mouse click event.

  4. Using mouse will not show this problem.

Any one has a good explanation on this? Is this a bug, or a feature? The reason I am investigating this is my actual application sometimes become unresponsive to touch for a while, then after a few try (not necessarily 10 taps), it becomes normal again. Very annoying.


Please see the simple code demonstrating this problem in https://github.com/GuangSunshine/WpfTouchTest.git

(Edited on Apr 09)
I found another case to show this problem:
1. From my main window, click "Button 1" to pop up a modal message box.
2. While this pop up message box showing, tap outside it on the main window once, it blinks and make sound, this is expected.
3. Wait until the blink and sound effect finishes. Now tap the outside of message box again, to make it blink again.
4. Wait, tap again to make it blink again. Remember we tapped outside 3 times, made it blink 3 times.
5. Now click "OK" on the message box to close the message box.
6. On the main window, click "button 1" again.
7. On the pop up message box, click "OK" to close it.
8. Repeat step 6 and 7 two more times. Now we have tapped "Button 1" 3 times since step 5.
9. Now click the "Button 1" for the fourth time, you will find tapping the "Button 1" has no response, if you try 2 more times, it is back to normal again.

Looks to me that once you tap outside a modal box for more than once, it somehow memorizes the number of the additional taps, and later "punish" the user by not responding to user's tap for that many times. Seems this "punishment" is capped at 10. Very interesting.





windows-wpf
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Guang-8546
The pop up MessageBox blinks because MainWindow cannot get focus. Your Keep on taping the same button, it takes another 10 taps to click the button makes me a few confused, could you give me more detailed description about it?

0 Votes 0 ·

Hi @DaisyTian-MSFT,

I understand why the MessageBox blinks and I am fine with that. Here are more details:

If the user ignore the blinking and still quickly tap outside the MessageBox several times (yes some of my users do that), these taps seems backed up somewhere in the Windows message queue. Now the user finally realized there is a modal MessageBox, then the user taps "Close" on this modal MessageBox, it closes. So far so good.

After that, if the user try to tap the "Button 1" (or any other buttons) on my main window, the Button1 becomes blue, which I believe it means it get the focus, but instead of also recognizing it is a Button Click event and popping up a new MessageBox, nothing happens.

Now tap the same button again, nothing happens, keep tapping it for another 8 times (total 10 taps now), still nothing happens.

0 Votes 0 ·

(-- 2nd part of my response --)

Looks to me some previously backed up events/messages are being cleared, one by one, when one finger touchDown-touchUp event occurs, and looks like it takes 10 of such taps to clear everything and get back to normal. Now if you tap it one more time, it finally recognizes the tap as a Button Click event and pops up a new MessageBox.

More observation: If during step 1 the user tap outside the MessageBox as quick as possible for many times (>5?), later in step 2 you will need 10 taps to "clear" out the non-responsiveness; if the user tap outside the MessageBox slightly slower or just a few times (3-5 times?), later in step 2 you may not need 10 taps but lesser to "clear" out the non-responsiveness.

Please try out the simple code demonstrating this problem in https://github.com/GuangSunshine/WpfTouchTest.git, open in VS2019 v16.8.3 and build with .Net Framework 4.7.2

0 Votes 0 ·

@DaisyTian-MSFT, please check out my new findings and help, I feel this might be a bug in WPF/.NET framework.

0 Votes 0 ·

Tested with .NET 5 and VS2019 16.9.0, the problem still persists. @DaisyTian-MSFT @CharlesHe-MSFT @HuiLiu-MSFT @RoyLi-MSFT could any one of you please help look into this? Thanks!

0 Votes 0 ·

@DaisyTian-MSFT , is there any advice you can provide? Thanks!

0 Votes 0 ·

0 Answers