Search code examples
windows-phone-8textboxwindows-phonewptoolkit

PhoneTextBox cursor resets after applying text suggestion


I'm using the PhoneTextBox from the Windows Phone Toolkit with InputScope="Text" to get autocorrect and text suggestions. While typing in the keyboard the text suggestions appears above the keyboard and I choose one of them. Immediately after the suggestion is taken the cursor of the TextBox resets to the start position. So if I continue typing then the new text is inserted at the beginning of the TextBox.

Here's an example: After choosing the text suggestion "Tests" the cursor begin of line.

PhoneTextBox

EDIT: The issue is caused by an calling of BindingExpression.UpdateSource() within the TextChanged event handler. I can't find a workaround so I created an issue: https://phone.codeplex.com/workitem/11766


Solution

  • I'm using a Windows 8 phone with the regular Phone 8.0 SDK.

    <toolkit:PhoneTextBox InputScope="Text" BorderThickness="0,0,0,3" Background="{x:Null}" Foreground="White"/>
    

    It works fine on my end. I would check if there are any attached events (maybe TextChanged) that would cause the cursor to reset.