Skip to content

Commit fe5bb21

Browse files
committed
Add delay for searchbox focus as workaround on Sierra
1 parent c26f4df commit fe5bb21

File tree

3 files changed

+18
-26
lines changed

3 files changed

+18
-26
lines changed

AppController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ -(void)menuWillOpen:(NSMenu *)menu
198198
menuOpenEvent = [event retain]; // So we can send it again to open the menu.
199199
[menu cancelTracking]; // Prevent the menu from displaying, since activateIgnoringOtherApps would close it anyway.
200200
[NSApp activateIgnoringOtherApps: YES]; // Required to make the search field firstResponder any good.
201-
[self performSelector:@selector(reopenMenu) withObject:nil afterDelay:0.0 inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]; // Because we really do want the menu open.
201+
[self performSelector:@selector(reopenMenu) withObject:nil afterDelay:0.2 inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]; // Because we really do want the menu open.
202202
}
203203
else
204204
{
205205
// Flycut is now active, so set the first responder once the menu opens.
206-
[self performSelector:@selector(activateSearchBox) withObject:nil afterDelay:0.0 inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]];
206+
[self performSelector:@selector(activateSearchBox) withObject:nil afterDelay:0.2 inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]];
207207
}
208208
}
209209
}

English.lproj/MainMenu.nib/designable.nib

Lines changed: 16 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
95 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)