diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m b/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m index a00603da..ad9f5e3d 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m @@ -414,14 +414,7 @@ if (![focusedElement isKindOfClass:[UIView class]]) { return NO; } - UIView *focusedView = focusedElement; - while (focusedView != nil) { - if (focusedView == self) { - return YES; - } - focusedView = [focusedView superview]; - } - return NO; + return [(UIView *)focusedElement isDescendantOfView:self]; } - (void)accessibilityFocusChanged:(NSNotification *)notification {