Bug 52613 - [UWP] With multiple entries in a Grid, that is in a ScrollView, clicking on the Grid causes first entry to be focused.
Summary: [UWP] With multiple entries in a Grid, that is in a ScrollView, clicking on t...
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.3
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Chris King
URL:
Depends on:
Blocks:
 
Reported: 2017-02-18 02:59 UTC by Jon Goldberger [MSFT]
Modified: 2017-10-16 21:14 UTC (History)
6 users (show)

Tags: uwp, grid, scrollview, entry, ac
Is this bug a regression?: ---
Last known good build:


Attachments
Test Project (320.04 KB, application/zip)
2017-02-18 02:59 UTC, Jon Goldberger [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 52613 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Jon Goldberger [MSFT] 2017-02-18 02:59:24 UTC
Created attachment 19875 [details]
Test Project

## Description

With multiple entries in a Grid, that is in a ScrollView, clicking on an empty area of the Grid causes the first entry to be focused, even if another Entry is already focused, or if no Entry is focused. I would expect all Entries to be unfocused when clicking in a blank area of the Grid (as occurs on iOS and Android)

E.g.:

><ScrollView>
>        <Grid VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" BackgroundColor="Aqua" >
>            <Grid.RowDefinitions>
>                <RowDefinition Height="30" />
>                <RowDefinition Height="30" />
>                <RowDefinition Height="30" />
>            </Grid.RowDefinitions>
>            <Grid.ColumnDefinitions>
>                <ColumnDefinition Width="*" />
>                <ColumnDefinition Width="*" />
>            </Grid.ColumnDefinitions>
>            <Entry Grid.Row="0" Grid.Column="0"/>
>            <Entry Grid.Row="0" Grid.Column="1"/>
>            <Entry Grid.Row="1" Grid.Column="0"/>
>            <Entry Grid.Row="1" Grid.Column="1"/>
>            <Entry Grid.Row="2" Grid.Column="0"/>
>            <Entry Grid.Row="2" Grid.Column="1"/>
>        </Grid>
>    </ScrollView>

Removing the ScrollView, this issue does not occur. 

## Steps to reproduce

1. Open the attached test project in Visual Studio

2. Deploy the UWP app to a Windows 10 device (tested with local machine)

3. Click on the the last Entry in the grid (or any entry other than the top left one)

4. Click on a blank area of the Grid (anywhere below the three rows of Entry controls)

Expected result: All Entry controls will lose focus.

Actual result: The first Entry in the Grid gains focus.

## Notes

Tested in 2.3.4-pre2 with the same results

## Environment

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA815
Microsoft Architecture and Modeling Tools
   
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Microsoft Visual Studio Tools for Applications 2015   00322-80000-00000-AA815
Microsoft Visual Studio Tools for Applications 2015

Visual Basic 2015   00322-80000-00000-AA815
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA815
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA815
Microsoft Visual C++ 2015

Visual F# 2015   00322-80000-00000-AA815
Microsoft Visual F# 2015

Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA815
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.18.00214.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1   14.1.20907.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.9.5   14.0.20810.0
Azure App Service Tools v2.9.5

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.1.0000.0
Microsoft Azure Data Lake Tools for Visual Studio

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Merq   1.1.14-alpha (21c13c9)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft .NET Core Tools (Preview 2)   14.1.20907.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Hive Query Language Service   2.1.0000.0
Language service for Hive query

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.41025.2

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Analysis Services   13.0.1700.281
Microsoft SQL Server Analysis Services Designer
Version 13.0.1700.281

SQL Server Data Tools   14.0.60923.0
Microsoft SQL Server Data Tools

SQL Server Integration Services  
Microsoft SQL Server Integration Services Designer
Version 13.0.1601.5

SQL Server Reporting Services   13.0.1700.281
Microsoft SQL Server Reporting Services Designers
Version 13.0.1700.281

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps   14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin   4.3.0.738 (9473a85)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.1.0.35 (0ff0aec)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.4.0.121 (9d6e1ab)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 2 Joe Manke 2017-10-16 20:51:21 UTC
This also occurs if the content of the ScrollView is a StackLayout rather than a Grid.
Comment 3 Joe Manke 2017-10-16 21:14:26 UTC
Furthermore, it will focus the first focusable view, it is not limited to just Entries or the first child. So for example, clicking on the StackLayout in this layout will result in the Button being focused:

<ScrollView BackgroundColor="LightGreen">
    <StackLayout BackgroundColor="Aqua"
        Spacing="10">
        <Label Text="Label 1"/>
        <Label Text="Label 2"/>
        <Label Text="Label 3"/>
        <Button Text="Button"/>
        <Entry Placeholder="Entry 1"/>
        <Entry Placeholder="Entry 2"/>
        <Entry Placeholder="Entry 3"/>
    </StackLayout>
</ScrollView>