diff --git a/MacPass/MPToolbarDelegate.m b/MacPass/MPToolbarDelegate.m index 098ef5b0..372758b0 100644 --- a/MacPass/MPToolbarDelegate.m +++ b/MacPass/MPToolbarDelegate.m @@ -244,6 +244,12 @@ NSString *const MPToolbarItemAutotype = @"TOOLBAR_AUTOTYPE"; [[NSApp targetForAction:@selector(focusEntries:) to:nil from:self] focusEntries:self]; }); } + if(commandSelector == @selector(cancel:) && control == self.searchField) { + dispatch_async(dispatch_get_main_queue(), ^{ + NSSearchFieldCell *cell = self.searchField.cell; + [[NSApp targetForAction:cell.cancelButtonCell.action to:nil from:self] exitSearch:nil]; + }); + } return NO; }