Merge branch 'bugfix/notification_accessibility_dismiss' into 'develop'
Bugfix/notification accessibility dismiss See merge request BPHV_MIPS/mvm_core_ui!712
This commit is contained in:
commit
1f55525bac
@ -160,7 +160,7 @@ import Foundation
|
|||||||
|
|
||||||
/// Collapse if focus is no longer on this top alert.
|
/// Collapse if focus is no longer on this top alert.
|
||||||
@objc func accessibilityFocusChanged(notification: Notification) {
|
@objc func accessibilityFocusChanged(notification: Notification) {
|
||||||
if !MVMCoreUIUtility.viewContainsAccessiblityFocus(self) {
|
if (notification.userInfo?[UIAccessibility.focusedElementUserInfoKey] != nil) && !MVMCoreUIUtility.viewContainsAccessiblityFocus(self) {
|
||||||
NotificationCenter.default.removeObserver(self, name: UIAccessibility.elementFocusedNotification, object: nil)
|
NotificationCenter.default.removeObserver(self, name: UIAccessibility.elementFocusedNotification, object: nil)
|
||||||
collapse()
|
collapse()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -423,7 +423,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)accessibilityFocusChanged:(NSNotification *)notification {
|
- (void)accessibilityFocusChanged:(NSNotification *)notification {
|
||||||
if (![MVMCoreUIUtility viewContainsAccessiblityFocus:self]) {
|
if (notification.userInfo[UIAccessibilityFocusedElementKey] && ![MVMCoreUIUtility viewContainsAccessiblityFocus:self]) {
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIAccessibilityElementFocusedNotification object:nil];
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIAccessibilityElementFocusedNotification object:nil];
|
||||||
[self collapse];
|
[self collapse];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -335,7 +335,7 @@ NSString * const MFAccTopAlertClosed = @"Top alert notification is closed.";
|
|||||||
|
|
||||||
/// If the voice over user leaves top alert focus, hide.
|
/// If the voice over user leaves top alert focus, hide.
|
||||||
- (void)accessibilityFocusChanged:(NSNotification *)notification {
|
- (void)accessibilityFocusChanged:(NSNotification *)notification {
|
||||||
if (![MVMCoreUIUtility viewContainsAccessiblityFocus:self]) {
|
if (notification.userInfo[UIAccessibilityFocusedElementKey] && ![MVMCoreUIUtility viewContainsAccessiblityFocus:self]) {
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIAccessibilityElementFocusedNotification object:nil];
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIAccessibilityElementFocusedNotification object:nil];
|
||||||
[self hideAlertView:YES completionHandler:self.hideCompletionHandler];
|
[self hideAlertView:YES completionHandler:self.hideCompletionHandler];
|
||||||
self.hideCompletionHandler = nil;
|
self.hideCompletionHandler = nil;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user