WindowsCommunityToolkit icon indicating copy to clipboard operation
WindowsCommunityToolkit copied to clipboard

TextBoxMask.Mask issue after changing selected tab from TabView

Open c4rlosmarin opened this issue 7 years ago • 3 comments

Describe the bug

For some reason changing the TabView selected tab makes the TextBoxMask.Mask go crazy

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run the project from https://1drv.ms/u/s!AgD0z8JsfL_7gsdaPPyFPuaTvXtXtQ?e=aTjP5a
  2. Put a valid date and time within dtpStartTime control
  3. Select Tab2
  4. Select Tab1
  5. Select all text within the dtpStartTime control and press the "Backspace" key
  6. Put a valid date and time within dtpStartTime control
  7. At this point the mask won't work anymore, it won't let the cursor to move forward while typing the date
  8. Select Tab2
  9. Select Tab1
  10. Select all text within the dtpStartTime control and press the "Backspace" key
  11. Put a valid date and time within dtpStartTime control
  12. At this point the control will display repeated numbers instead of the correct date

Expected behavior

The TextBoxMask.Mask extension should work as expected after changing the selected Tab and then going back to Tab1

Video

https://1drv.ms/v/s!AgD0z8JsfL_7gsdZmbKDL7TbZbOw1w?e=RY7kjQ Every time I entered the value "12312019 0000"

Environment

NuGet Package(s): Microsoft.Toolkit.Uwp.UI 5.1.1 Microsoft.Toolkit.Uwp.UI.Controls 5.1.1

Package Version(s):

Windows 10 Build Number:

  • [ ] Fall Creators Update (16299)
  • [ ] April 2018 Update (17134)
  • [ ] October 2018 Update (17763)
  • [X] May 2019 Update (18362)
  • [ ] Insider Build (build number: )

App min and target version:

  • [ ] Fall Creators Update (16299)
  • [ ] April 2018 Update (17134)
  • [ ] October 2018 Update (17763)
  • [X] May 2019 Update (18362)
  • [ ] Insider Build (xxxxx)

Device form factor:

  • [X] Desktop
  • [ ] Xbox
  • [ ] Surface Hub
  • [ ] IoT

Visual Studio

  • [ ] 2017 (version: )
  • [X] 2019 (version: 16.2.3)
  • [ ] 2019 Preview (version: )

c4rlosmarin avatar Aug 24 '19 04:08 c4rlosmarin

@c4rlosmarin can you check if this behavior is the same in the new TabView for WinUI 2.2 that just released? If it's the same there it's either a bug in the TextBoxMask extension or the platform, but it'd help us narrow it down to be outside of our TabView. Thanks!

michael-hawker avatar Sep 04 '19 20:09 michael-hawker

Hi @michael-hawker, is there some documentation about how to add a TabView for WinUI 2.2 through the XAML designer? So far I haven't been able to add a TabViewItem element to it:

image

By the way, I was able to workaround this by implementing the tabs through a Pivot control. So I guess it's indeed a TabView control issue.

Cheers, CM

c4rlosmarin avatar Oct 05 '19 22:10 c4rlosmarin

@c4rlosmarin there was an issue before with needing to specify the tabs in a TabItems collection, that's been resolved. You can find documentation about TabView here.

We're going to be deprecating our TabView now that the WinUI one supports the majority of our scenarios, so I'm going to close this issue. If you still notice a problem with their TabView, please open an issue on their repo here, thanks!

michael-hawker avatar May 26 '20 18:05 michael-hawker