This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
shell/platform/darwin/ios/framework/Source Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -80,11 +80,20 @@ - (CGRect)frame {
80
80
- (NSArray <id<UIFocusItem>>*)focusItemsInRect : (CGRect)rect {
81
81
// It seems the iOS focus system relies heavily on focusItemsInRect
82
82
// (instead of preferredFocusEnvironments) for directional navigation.
83
- // Whether the item order in the returned array matters is unknown.
84
83
//
85
- // Additionally, this method is only supposed to return items within the given
84
+ // The order of the items seems to be important, menus and dialogs become
85
+ // unreachable via FKA if the returned children are organized
86
+ // in hit-test order.
87
+ //
88
+ // This method is only supposed to return items within the given
86
89
// rect but returning everything in the subtree seems to work fine.
87
- return self.childrenInHitTestOrder ;
90
+ NSMutableArray <SemanticsObject*>* reversedItems =
91
+ [[NSMutableArray alloc ] initWithCapacity: self .childrenInHitTestOrder.count];
92
+ for (NSUInteger i = 0 ; i < self.childrenInHitTestOrder .count ; ++i) {
93
+ [reversedItems
94
+ addObject: self .childrenInHitTestOrder[self .childrenInHitTestOrder.count - 1 - i]];
95
+ }
96
+ return reversedItems;
88
97
}
89
98
90
99
- (id <UICoordinateSpace>)coordinateSpace {
You can’t perform that action at this time.
0 commit comments