From 8dd2a476f757754406e8832ed1d199fe6188d469 Mon Sep 17 00:00:00 2001 From: Ivan Grachyov Date: Sat, 17 Jul 2021 19:45:04 +0300 Subject: [PATCH] Don't highlight menu first item on popup --- Encrypted Ink/Screens/AccountsListViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Encrypted Ink/Screens/AccountsListViewController.swift b/Encrypted Ink/Screens/AccountsListViewController.swift index 27e549fa..748cf93c 100644 --- a/Encrypted Ink/Screens/AccountsListViewController.swift +++ b/Encrypted Ink/Screens/AccountsListViewController.swift @@ -91,7 +91,7 @@ class AccountsListViewController: NSViewController { var origin = sender.frame.origin origin.x += sender.frame.width origin.y += sender.frame.height - menu?.popUp(positioning: createItem, at: origin, in: view) + menu?.popUp(positioning: nil, at: origin, in: view) } @objc private func didClickCreateAccount() { @@ -194,7 +194,7 @@ extension AccountsListViewController: NSTableViewDelegate { Timer.scheduledTimer(withTimeInterval: 0.01, repeats: false) { [weak self] _ in var point = NSEvent.mouseLocation point.x += 1 - self?.tableView.menu?.popUp(positioning: tableView.menu?.items.first, at: point, in: nil) + self?.tableView.menu?.popUp(positioning: nil, at: point, in: nil) } } return true