Dismiss keyboard when dropping down preferences or app deactivates.
This commit is contained in:
		@@ -309,6 +309,7 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
 | 
			
		||||
    PearlRemoveNotificationObservers();
 | 
			
		||||
    PearlAddNotificationObserver( UIApplicationWillResignActiveNotification, nil, [NSOperationQueue mainQueue],
 | 
			
		||||
            ^(MPPasswordsViewController *self, NSNotification *note) {
 | 
			
		||||
                [self.view endEditing:YES];
 | 
			
		||||
                self.passwordSelectionContainer.visible = NO;
 | 
			
		||||
            } );
 | 
			
		||||
    PearlAddNotificationObserver( UIApplicationDidBecomeActiveNotification, nil, [NSOperationQueue mainQueue],
 | 
			
		||||
 
 | 
			
		||||
@@ -38,6 +38,7 @@
 | 
			
		||||
                                                              metrics:nil views:NSDictionaryOfVariableBindings( popdownView )];
 | 
			
		||||
 | 
			
		||||
        [passwordsVC.popdownToTopConstraint layoutIfNeeded];
 | 
			
		||||
        [passwordsVC.view endEditing:YES];
 | 
			
		||||
 | 
			
		||||
        [UIView animateWithDuration:0.6f delay:0 usingSpringWithDamping:0.75f initialSpringVelocity:1
 | 
			
		||||
                            options:UIViewAnimationOptionCurveEaseOut animations:^{
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user