xamarin/Xamarin.Forms

[UWP] Active child elements gets focused after disabling its root parent element

オープン

#6,254 opened on 2019/05/22

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)C# (1,926 件のフォーク)batch import
e/3 :clock3:help wantedinactivep/UWPt/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Description

Greetings,

We have noticed that when set the value of IsEnabled as 'False' for root parent element, its child elements still gets focused on tab navigation or by calling Focus() method. Our layout is as below. <Grid IsEnabled="False"> <ScrollView> <StackLayout> <Picker/> <DatePicker/> </StackLayout> </ScrollView> </Grid>

We expect the focus to move next focus-able element after Grid instead of focusing its child elements. Can you please confirm us whether this is a bug at your end or we are approaching it in a wrong way? Is it possible to change the value of IsEnabled property for the child elements in the parent renderer based on its value?

Thanks.

Steps to Reproduce

Tab focusing:

  1. Run the attached sample.
  2. Tab navigate across the items. Note that Picker and DatePicker(2nd column elements) inside Grid element gets focused.

Programmatic focusing:

  1. Run the sample.
  2. Press the Focus Picker and Focus DatePicker button. Note that the picker and DatePicker elements gets focused.

Expected Behavior

While disabling the parent element, child elements also be disabled.

Actual Behavior

Child elements is not disabled when disabling its parent element.

Reproduction Link

DatePickerIssue.zip

コントリビューターガイド