[UWP] Active child elements gets focused after disabling its root parent element
#6,254 创建于 2019年5月22日
仓库指标
- 星标
- (5,644 个星标)
- PR 合并指标
- (30 天内没有已合并 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:
- Run the attached sample.
- Tab navigate across the items. Note that Picker and DatePicker(2nd column elements) inside Grid element gets focused.
Programmatic focusing:
- Run the sample.
- 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.