microsoft-ui-xaml: Unable to Enter Text into TextBox inside ContentDialog in WinUI3 Desktop

Describe the bug

In WinUI3 Desktop, we are unable to type in text into the TextBoxes inside ContentDialogs with some exceptions.

More detailed observations and debugging below in the “Additional Context” section.

Steps to reproduce the bug

  1. Clone our WinUI3 Problems TextBox repository.
  2. Go to the TextBoxWinUI folder.
  3. Open the TextBoxWinUI solution.
  4. Build and run with Debug x64.
  5. Once the application is loaded, click the “Click me” button.
  6. Without clicking or clicking away from or outside of the application window, start typing into the TextBox.
  7. No characters should appear - unless actions described in the “Additional context” are performed.

Expected behavior

We expect text to appear within the textbox when typing. We expect to see the same behavior we saw in UWP.

Build and run the TextBoxUWP solution inside the TextBoxUWP folder to see expected behavior.

Screenshots

TextBoxCurrentBehavior

Screenshot#1 - TextBox inside ContentDialog

Version Info

NuGet package version: [Microsoft.VCRTForwarders.140 1.0.6] [Microsoft.WinUI 3.0.0-preview1.200515.3]

Targeting: Target: Universal Windows Target version: Windows 10, version 1809 (10.0; Build 17763) Min version: Windows 10, version 1809 (10.0; Build 17763)

Windows 10 version Saw the problem?
Insider Build (xxxxx)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763) Yes
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Mobile
Xbox
Surface Hub
IoT

Additional context

  • When trying to type into the TextBox immediately, no characters appear.

  • When trying to type quickly with many characters into the TextBox immediately, the text cursor seems to freeze up and not blink.

  • However, after clicking away from or outside of the application window, we are able to type in a subset of characters into the TextBox. This subset includes:

    • These characters which use the same 5 keys with and without the shift key: []{}'"|`~
    • Backspace key works.
    • Characters created using the Alt key and numeric keypad (e.g. Alt-65 for “A”).
    • Characters copied from elsewhere can be pasted into the TextBox.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 8
  • Comments: 15 (8 by maintainers)

Most upvoted comments

@smj389, @crramirez It looks like this bug will be fixed in the next release of WinUI 3.

I’m having the same issue, is there no workaround? My app depends on ContentDialogs with text boxes.

Wiiiii, thanks a lot for letting us know.

Confirming - this bug has been fixed, and the fix will be available in our next release - WinUI 3 Preview 4. We’re hoping to ship this preview release in early February. Thanks!

No problem @smj389 - we’re actively looking into this and I hope to report back soon!

@lyahdav This is an issue on OS XAML too

This bug appears to be fixed internally, hopefully it will be in Preview 3 later this year.

Just to say, I have the same problem with Preview 2. I am on the latest Insider build of Windows 10.