Skip to content

Commit 1f2da37

Browse files
authored
fix: Focus the collection view when showing the context menu (#19)
1 parent 858d305 commit 1f2da37

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Sources/SelectableCollectionView/Views/InteractiveCollectionView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ class InteractiveCollectionView: NSCollectionView {
5959
}
6060

6161
override func menu(for event: NSEvent) -> NSMenu? {
62+
window?.makeFirstResponder(self)
6263

6364
// Update the selection if necessary.
6465
let point = convert(event.locationInWindow, from: nil)

0 commit comments

Comments
 (0)