Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Search Support

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
Open

How to disable tab buttons such as the X close button and youtube play/mute buttons ?

Salon

I use middle-click to close the tabs and move and select tabs around a lot and often misclick on a button by accident and I find that really annoying and tedious to always have to scrutinize the buttons before clicking.

I want to hide all of these buttons.

I have tried userchrome and etc... user scripts, that does not work reliably.

I use middle-click to close the tabs and move and select tabs around a lot and often misclick on a button by accident and I find that really annoying and tedious to always have to scrutinize the buttons before clicking. I want to hide all of these buttons. I have tried userchrome and etc... user scripts, that does not work reliably.

All Replies (2)

There's nothing more reliable than custom CSS.

You might need to ask around some specific communities for assistance though (like FirefoxCSS on reddit for example).

Thanks I wish there was a proper option to disable this, I often click them by accident and now every time I touch the tabs, I need to be careful, it's really irritating and slowing me down. I don't even need the close button since I have the habit to close them with middle click.

I traced where do these buttons come from

They start here in class MozTabbrowserTab

https://github.com/mozilla-firefox/firefox/blob/main/browser/components/tabbrowser/content/tab.mjs#L20-L55

For instance the close button is

<image class="tab-close-button close-icon" role="button" data-l10n-id="tabbrowser-close-tabs-button" data-l10n-args='{"tabCount": 1}' keyNav="false"/>

The handling of click events for the buttons is in these fonctions, https://github.com/mozilla-firefox/firefox/blob/main/browser/components/tabbrowser/content/tab.mjs#L580-L775 on_click(event) { on_mouseup() { on_mousedown(event) {

The close button handler in particular https://github.com/mozilla-firefox/firefox/blob/main/browser/components/tabbrowser/content/tab.mjs#L727-L745

And the visual appearance is here https://github.com/mozilla-firefox/firefox/blob/main/browser/themes/shared/tabbrowser/tabs.css

I think maybe patching the tabs.css might have a way from at least disabling the close buttons

But disabling buttons like Youtube play/pause is going to be something else.

There should be an option for a full lockdown of the tab to make then only have fav icon and title and nothing else

And there should be a way to remove only certain elements reliably I'm not against any kind of tab activity, but I don't want close buttons and I don't want youtube buttons

I have added the userchrome text to disable them, but they come back ~sometimes~ for instance, before the tab loads, is in a discarded state, the buttons are sometimes gone, but after a reload they come back. It is like the userchrome settings are getting overridden on reloads.

I don't want to keep having to fight this system, I want to reliably turn of the things I don't want, or turn off the entire thing if that's the only to make this stop !

Tanya soalan

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