diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue4653.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue4653.cs
new file mode 100644
index 00000000000..4b5ec0f2251
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue4653.cs
@@ -0,0 +1,74 @@
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Github, 4653, "IsTabStop property not working when Grid contains ScrollView", PlatformAffected.UWP)]
+ public class Issue4653 : TestContentPage
+ {
+ protected override void Init()
+ {
+ var grid = new Grid()
+ {
+ Padding = new Thickness(10),
+ BackgroundColor = Color.Aquamarine,
+ IsTabStop = false
+ };
+ grid.AddChild(new Button
+ {
+ Text = "Toggle Grid IsTabStop",
+ Command = new Command(() => grid.IsTabStop = !grid.IsTabStop)
+ }, 0, 0);
+ grid.AddChild(new Button
+ {
+ Text = "IsTabStop: false",
+ IsTabStop = false
+ }, 1, 0);
+
+ var buttonInSctoolView = new Button
+ {
+ Text = "Button inside tadded ScrollView",
+ IsTabStop = false
+ };
+ buttonInSctoolView.Command = new Command(() => {
+ buttonInSctoolView.IsTabStop = !buttonInSctoolView.IsTabStop;
+ buttonInSctoolView.Text = $"IsTabStop: {buttonInSctoolView.IsTabStop}";
+ });
+
+ grid.AddChild(new ScrollView
+ {
+ Content = buttonInSctoolView
+ }, 0, 1);
+
+ grid.AddChild(new Entry
+ {
+ Text = "entry"
+ }, 1, 1);
+
+ int col = 2;
+ grid.AddChild(new Button
+ {
+ Text = "Add default button",
+ IsTabStop = false,
+ Command = new Command(() => grid.AddChild(new Button { Text = "default" }, 0, ++col))
+ }, 0, 2);
+
+ int colNonTabbed = 2;
+ grid.AddChild(new Button
+ {
+ Text = "Add non tabbed button",
+ IsTabStop = true,
+ Command = new Command(() => grid.AddChild(new Button { Text = "non tabbed", IsTabStop = false }, 1, ++colNonTabbed))
+ }, 1, 2);
+
+ Content = new StackLayout
+ {
+ Children =
+ {
+ grid
+ }
+ };
+ }
+ }
+}
\ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
index 78e8d928b05..db73cc63f18 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
@@ -84,6 +84,7 @@
+
diff --git a/Xamarin.Forms.Platform.UAP/IDontGetFocus.cs b/Xamarin.Forms.Platform.UAP/IDontGetFocus.cs
new file mode 100644
index 00000000000..4def28f5d16
--- /dev/null
+++ b/Xamarin.Forms.Platform.UAP/IDontGetFocus.cs
@@ -0,0 +1,6 @@
+namespace Xamarin.Forms.Platform.UWP
+{
+ public interface IDontGetFocus
+ {
+ }
+}
diff --git a/Xamarin.Forms.Platform.UAP/ITabStopOnDescendants.cs b/Xamarin.Forms.Platform.UAP/ITabStopOnDescendants.cs
index 4209fa68726..91992f210c3 100644
--- a/Xamarin.Forms.Platform.UAP/ITabStopOnDescendants.cs
+++ b/Xamarin.Forms.Platform.UAP/ITabStopOnDescendants.cs
@@ -1,6 +1,6 @@
namespace Xamarin.Forms.Platform.UWP
{
- public interface ITabStopOnDescendants
+ public interface ITabStopOnDescendants: IDontGetFocus
{
}
}
diff --git a/Xamarin.Forms.Platform.UAP/ScrollViewRenderer.cs b/Xamarin.Forms.Platform.UAP/ScrollViewRenderer.cs
index 06de39212ff..e05a20610da 100644
--- a/Xamarin.Forms.Platform.UAP/ScrollViewRenderer.cs
+++ b/Xamarin.Forms.Platform.UAP/ScrollViewRenderer.cs
@@ -8,7 +8,7 @@
namespace Xamarin.Forms.Platform.UWP
{
- public class ScrollViewRenderer : ViewRenderer
+ public class ScrollViewRenderer : ViewRenderer, IDontGetFocus
{
VisualElement _currentView;
bool _checkedForRtlScroll = false;
diff --git a/Xamarin.Forms.Platform.UAP/VisualElementRenderer.cs b/Xamarin.Forms.Platform.UAP/VisualElementRenderer.cs
index 5d5e8c3932e..e8069520f7c 100644
--- a/Xamarin.Forms.Platform.UAP/VisualElementRenderer.cs
+++ b/Xamarin.Forms.Platform.UAP/VisualElementRenderer.cs
@@ -155,7 +155,7 @@ public void SetElement(VisualElement element)
OnElementChanged(new ElementChangedEventArgs(oldElement, Element));
- if (_control != null && this is ITabStopOnDescendants)
+ if (_control != null && this is IDontGetFocus)
{
_control.GotFocus += OnGotFocus;
_control.GettingFocus += OnGettingFocus;
diff --git a/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj b/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj
index 14d9c45a978..be4065b8195 100644
--- a/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj
+++ b/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj
@@ -49,6 +49,7 @@
+