Skip to content

Middle clicking on tab on macOS should close it #11962

Description

@jcollie

Discussed in #10264

Originally posted by rayhanadev January 10, 2026
It would be great to support middle-click-to-close for tabs on macOS when macos-titlebar-style = tabs is enabled.

This behavior already exists on GTK via PR #1077, and having the same interaction on macOS would be a nice quality-of-life improvement!

Why this is useful:

  • Common and intuitive tab behavior across many apps
  • Faster than targeting the close button, especially with many tabs
  • Improves parity between platforms

Expected behavior:

  • Middle-clicking directly on a tab closes that tab
  • Uses the same close semantics as the existing close button

Current behavior:

  • Middle-clicking a tab does nothing

Notes:

  • GTK implements this by handling the middle mouse button on the tab UI
  • I’m hoping a similar hook is possible on macOS
  • Already exploring an implementation on a fork, happy to contribute upstream! :)

Activity

  1. added
    contributor friendlyA well-scoped, approachable issue for someone looking to contribute.
    guiGUI or app issue regardless of platform (i.e. Swift, GTK)
    on Mar 29, 2026
  2. added theissue type on Mar 29, 2026
  3. added this to the 1.4.0 milestone on Mar 29, 2026
  4. jcollie commented on Mar 29, 2026

    @jcollie
    MemberAuthor

    Feature parity with GTK: #1077

  5. changed the title [-]Middle clicking on tab on nacOS should close it[/-] [+]Middle clicking on tab on macOS should close it[/+] on Mar 29, 2026
  6. mitchellh commented on Mar 29, 2026

    @mitchellh
    Contributor

    This isn’t idiomatic macOS behavior as far as I know. I’d be curious what other macOS apps if any support this?

  7. kicanter commented on Mar 29, 2026

    @kicanter

    I think most of the 1P Mac apps like Safari, Finder, Terminal, etc. (pretty much anything you can make a new tab in with Cmd+t) support middle-click to close tabs.

  8. rayhanadev commented on Mar 29, 2026

    @rayhanadev

    Thanks for making this an issue!! I'll have to double-check support in native apps when I get to my desk, but I know middle click to close is supported in browsers.

  9. mitchellh commented on Mar 29, 2026

    @mitchellh
    Contributor

    Thanks @KieranCanter! I accept this!

  10. added a commit that references this issue on Mar 29, 2026
    5540f5f
  11. nicholaspufal commented on May 13, 2026

    @nicholaspufal

    @mitchellh Looks like this feature got reverted? I see it got reverted in #11984

    Are there any plans to add it back?

    Since switching to Ghostty from iTerm it has been my major gripe. Thanks!

  12. bo2themax commented on May 13, 2026

    @bo2themax
    Member

    @mitchellh Looks like this feature got reverted? I see it got reverted in #11984

    Are there any plans to add it back?

    Since switching to Ghostty from iTerm it has been my major gripe. Thanks!

    As I said in the pr description it's working outside of box, and I just checked with tip version, it's still working on macOS 26.5 and 15.5. Do you mind opening another issue triage discussion for your experience with more detailed info?

  13. nicholaspufal commented on May 13, 2026

    @nicholaspufal

    @bo2themax sorry, tip was misconfigured on my end.

    I can confirm it's working with tip 👍

  14. locked and limited conversation to collaborators on May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributor friendlyA well-scoped, approachable issue for someone looking to contribute.guiGUI or app issue regardless of platform (i.e. Swift, GTK)os/macos

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions