X
Tap here to go to the mobile version of the site.

Support Forum

Disable middle click tab bar

Posted

My previous question: https://support.mozilla.org/en-US/questions/1254024

With the latest update, the following css tweak to disable the creation of new tab when middle clicking the empty tab bar area no longer works.

https://pastebin.com/zSJYR8PJ

This along with the shortcut CTRL+SHIFT+P to open a new private window are features no other browsers have.

My previous question: https://support.mozilla.org/en-US/questions/1254024 With the latest update, the following css tweak to disable the creation of new tab when middle clicking the empty tab bar area no longer works. https://pastebin.com/zSJYR8PJ This along with the shortcut CTRL+SHIFT+P to open a new private window are features no other browsers have.

Modified by ZetiX

Chosen solution

Hmm, still works for me, except the new tab + button wasn't working so I had to change its selector:

/* Block middle-click on tab bar */
#tabbrowser-tabs .arrowscrollbox-scrollbox {
  pointer-events: none;
}
/* Exceptions: tabs, new tab button */
.tabbrowser-tab, #tabs-newtab-button {
  pointer-events: auto !important;
}

This was in a new Firefox profile on Windows, so no title bar, no menu bar, tabs on top, etc.

Read this answer in context 0
Quote
jscher2000
  • Top 10 Contributor
8773 solutions 71729 answers

Chosen Solution

Hmm, still works for me, except the new tab + button wasn't working so I had to change its selector:

/* Block middle-click on tab bar */
#tabbrowser-tabs .arrowscrollbox-scrollbox {
  pointer-events: none;
}
/* Exceptions: tabs, new tab button */
.tabbrowser-tab, #tabs-newtab-button {
  pointer-events: auto !important;
}

This was in a new Firefox profile on Windows, so no title bar, no menu bar, tabs on top, etc.

Hmm, still works for me, except the new tab + button wasn't working so I had to change its selector: <pre>/* Block middle-click on tab bar */ #tabbrowser-tabs .arrowscrollbox-scrollbox { pointer-events: none; } /* Exceptions: tabs, new tab button */ .tabbrowser-tab, #tabs-newtab-button { pointer-events: auto !important; } </pre> This was in a new Firefox profile on Windows, so no title bar, no menu bar, tabs on top, etc.
Was this helpful to you?
Quote

Question owner

My bad, you're correct that it only stops the new tab button from working. I was really frustrated when posting this as I had to remove the css tweak from every device thinking it wouldn't work.

Thank you so much for resolving this!

My bad, you're correct that it only stops the new tab button from working. I was really frustrated when posting this as I had to remove the css tweak from every device thinking it wouldn't work. Thank you so much for resolving this!
Was this helpful to you?
Quote
cor-el
  • Top 10 Contributor
  • Moderator
17539 solutions 158587 answers

Helpful Reply

This might be better code to allow a long press on the new tab button (containers tabs menu), otherwise you can't click an item in this drop-down menu.

/* TAB - Pointer Events */
#tabbrowser-tabs .arrowscrollbox-scrollbox{pointer-events: none}
.tabbrowser-tab,
#tabs-newtab-button,
.tabs-newtab-button,
.new-tab-popup, .new-tab-popup > *{pointer-events: auto}
This might be better code to allow a long press on the new tab button (containers tabs menu), otherwise you can't click an item in this drop-down menu. <pre><nowiki> /* TAB - Pointer Events */ #tabbrowser-tabs .arrowscrollbox-scrollbox{pointer-events: none} .tabbrowser-tab, #tabs-newtab-button, .tabs-newtab-button, .new-tab-popup, .new-tab-popup > *{pointer-events: auto}</nowiki></pre>
Was this helpful to you? 1
Quote
Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.