[UWP] fixes entering text into SearchBar with UI Tests (#4173)
authorPavel Yakovlev <v-payako@microsoft.com>
Tue, 23 Oct 2018 23:57:02 +0000 (02:57 +0300)
committerShane Neuville <shane94@hotmail.com>
Tue, 23 Oct 2018 23:57:02 +0000 (17:57 -0600)
* [UWP] fixes entering text into SearchBar with UI Tests

* [UWP] ITabStopOnDescendants - fixed selection when setting focus from Selenium

Xamarin.Forms.Platform.UAP/VisualElementRenderer.cs

index a2bfc81..e18cbd2 100644 (file)
@@ -174,7 +174,7 @@ namespace Xamarin.Forms.Platform.UWP
                void OnGotFocus(object sender, RoutedEventArgs e)
                {
                        if (e.OriginalSource == Control)
-                               FocusManager.TryMoveFocus(focusDirection);
+                               FocusManager.TryMoveFocus(focusDirection != FocusNavigationDirection.None ? focusDirection : FocusNavigationDirection.Next);
                }
 
                public event EventHandler<ElementChangedEventArgs<TElement>> ElementChanged;