We have a Uwp app with a lot of text boxes. Recently we noticed that after typing a few characters on a touch device, the textbox seems to hang and stop updating the text. If you touch the text box again or enter a few more characters, it will send a few more letters, etc. until it eventually catches up to what was typed. I am able to reproduce this with a simple text box bound to a viewmodel property. The problem does not exist in older builds of Windows, nor when typing with a physical keyboard. I suspect it is from the 1803 update. I can take a video to demonstrate if necessary.
//Xaml
<Page
x:Class="TextBoxDemo.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:TextBoxDemo"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<TextBox
Text="{x:Bind FooProperty, Mode=TwoWay}"/>
</Grid>
</Page>
//Xaml.cs using Windows.UI.Xaml.Controls;
namespace TextBoxDemo
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
public string FooProperty { get; set; }
}
}
I also tried:
Text="{Binding FooTextProperty, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
using a one way bind and handling the TextChanged event to update the property
This is a pretty big problem for us and extremely easy to reproduce so I hope I am just doing something wrong.
Update: I should mention it is much easier to reproduce while remote debugging, though the issue has been reported in release builds as well. Here is a video demo. I type "This is a test". By the time I start typing "is", it is already lagging behind, and then it gets stuck at "This is" until I touch the text box again. https://drive.google.com/file/d/13s_fcSGJtL2l1bPgcMrcLgqpLFBMfKvb/view?usp=sharing