We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

ابحث في الدعم

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How do I disable mouse shortcuts so the middle button on my mouse does not do anything (like closing the tab)?

more options

I don't want clicking the middle button on a tab header to close that tab. I want it to do nothing. How do I change this?

I don't want clicking the middle button on a tab header to close that tab. I want it to do nothing. How do I change this?

All Replies (2)

more options

Hi, how about have middle button do scrolling : https://addons.mozilla.org/firefox/addon/middle-mouse-button-scroll/

more options

deloren.lockett said

I don't want clicking the middle button on a tab header to close that tab. I want it to do nothing. How do I change this?

I'm not aware of a way to disable that action on the tab bar (there are some settings related to what the mouse wheel / middle button does in web pages). Maybe someone else is aware of a trick for it.

{Not a Solution} You probably know you can re-open the last closed tab using either:

  • Ctrl+Shift+t
  • right-click a different tab > Undo Close Tab

If the problem with those is that the entire window is closing (there's only one tab), you can set Firefox to show a new tab when you close the last tab in a window:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful or accepting the risk.

(2) In the search box above the list, type or paste tabs and pause while the list is filtered

(3) Double-click the browser.tabs.closeWindowWithLastTab preference to switch the value from true to false