diff --git a/macos/Sources/Features/Terminal/Window Styles/TerminalWindow.swift b/macos/Sources/Features/Terminal/Window Styles/TerminalWindow.swift index e19d6711f..ac1d2b881 100644 --- a/macos/Sources/Features/Terminal/Window Styles/TerminalWindow.swift +++ b/macos/Sources/Features/Terminal/Window Styles/TerminalWindow.swift @@ -184,6 +184,10 @@ class TerminalWindow: NSWindow { return } + if tabTitleEditor.handleRightMouseDown(event) { + return + } + super.sendEvent(event) } diff --git a/macos/Sources/Helpers/TabTitleEditor.swift b/macos/Sources/Helpers/TabTitleEditor.swift index 4be2c5306..3e04d73c1 100644 --- a/macos/Sources/Helpers/TabTitleEditor.swift +++ b/macos/Sources/Helpers/TabTitleEditor.swift @@ -125,6 +125,7 @@ final class TabTitleEditor: NSObject, NSTextFieldDelegate { /// /// If this returns true then the event was handled by the coordinator. func handleRightMouseDown(_ event: NSEvent) -> Bool { + guard event.type == .rightMouseDown else { return false } if isMouseEventWithinEditor(event) { inlineTitleEditor?.rightMouseDown(with: event) return true