Skip to content

[Feature Request] Add option to hide tab close button #470

@rc-chenga

Description

@rc-chenga

Please confirm (not required):

  • I have already looked at the Wiki.
  • I would like to contribute to this development.

Describe the Feature | Suggestion | Modification:

Problem statement:

When using small tabs (such as collapse vertical tabs), it's possible to accidentally click on the close button, when navigating and selecting tabs by mouse. Additionally, the button is potentially unnecessary for users that close tabs with middle-click or ctrl+w

Proposed solution:

Have an option to hide the close button.
I've currently implemented this locally by adding the following code block to theme\settings-TABS.css,

/* tabs close button hidden ---------------------------------------------------------------------------------- */
@media -moz-pref("ultima.tabs.closetabbutton.hide") {
    #tabbrowser-tabs[orient="vertical"] {
        .tab-close-button {
            display: none !important;
        }
    }
}

Referencing it in user.js,

user_pref("ultima.tabs.closetabbutton.hide", true);

And adding the new setting ultima.tabs.closetabbutton.hide as a boolean in about:config

Additional thoughts:

My solution works for me, and I thought it might be nice to share it!
I'd be curious if there are any more developed thoughts from someone more familiar with the codebase/implementation (e.g. whether it's possible to have the closetabbutton.hide function tied to, or depend on the collapsed vertical tab state - rather than its current behaviour of hiding it at all times universally, whenever the boolean is true)

Picture/Video of the desired outcome (if applicable):

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions