Wpf: Touch bug/issue with ShowDialog and TextBox

Created on 31 Jan 2020  路  5Comments  路  Source: dotnet/wpf

_This issue has been moved from a ticket on Developer Community._


Hello I'm developing a WPF application to be used with touch devices (Running Win 10 full).

There is one scenario where the touch stops responding as expected.
If I have a TextBox and open a dialog (ShowDialog()) then the dialog won't handle any touch and will ignore the user:

A) 1 touch ignored - if using single touch driver.

B) 10 touches ignored - if using multi touch driver.

And after that it starts responding normally again.

I have attached a video show casing this issue and also a test project so you can easily replicate (using Windows Simulator w/ touch or a touch monitor)
In the video you can see that when opening the dialog through a button it responds as expected but if opened through a TextBox it will then have a touch issue.

textbox-showdialog-touch-issue.mp4

ms-wpf-testtouchdialogs.zip

The code being used is just this:

        private void TextBox_PreviewMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            // This cause touch issues within the dialog.
            // (1 touch ignored w/ single touch monitor/driver - 10 touches ignored w/ multi touch monitor/driver)
            new DialogWindow(). ShowDialog();
        }

private void Button_Click(object sender, RoutedEventArgs e)
        {
            new DialogWindow(). ShowDialog();
        }

Windows 10
VS 2019
.NET 4.6.1 (but it was also tested with 4.8, exactly same issue)


Original Comments

Visual Studio Feedback System on 1/20/2020, 06:41 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Visual Studio Feedback System on 1/30/2020, 01:12 PM:

This issue is currently being investigated. Our team will get back to you if either more information is needed, a workaround is available, or the issue is resolved.


Original Solutions

(no solutions)

issue-type-bug

All 5 comments

This is an irritated and old bug which exists from .net framework 3.5. All first touch of non-button popup window锛坢odal锛墂ould be ignored

Hope the problem gets attention.

Is there a temporary solution?

Is there a temporary solution?

浣犳墍鏈夐渶瑕佸脊绐楃殑鍦版柟閮界敤button鏉ュ仛灏辫

I have the same error. I wonder why it takes 10 touches. I am currently doing a temporary fix using Dispatcher.BeginInvoke or DispatcherInvokeAsync

Was this page helpful?
0 / 5 - 0 ratings