Make current window key and front if we are opening Safari in the background. Issue #2427

This commit is contained in:
Maurice Parker 2020-09-23 18:30:34 -05:00
parent e575aeca3c
commit 2772b5e36d
1 changed files with 6 additions and 0 deletions

View File

@ -284,6 +284,9 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
}
@IBAction func openInBrowser(_ sender: Any?) {
if AppDefaults.shared.openInBrowserInBackground {
window?.makeKeyAndOrderFront(self)
}
openArticleInBrowser(sender)
}
@ -293,6 +296,9 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
}
@IBAction func openInBrowserUsingOppositeOfSettings(_ sender: Any?) {
if !AppDefaults.shared.openInBrowserInBackground {
window?.makeKeyAndOrderFront(self)
}
if let link = currentLink {
Browser.open(link, inBackground: !AppDefaults.shared.openInBrowserInBackground)
}