Skip to content

Firefox: hide navigation toolbars only when top menu is inactive#288

Merged
mtwebster merged 2 commits intolinuxmint:masterfrom
infinity0:master
May 8, 2024
Merged

Firefox: hide navigation toolbars only when top menu is inactive#288
mtwebster merged 2 commits intolinuxmint:masterfrom
infinity0:master

Conversation

@infinity0
Copy link
Copy Markdown
Contributor

Hiding navigation toolbars is nice most of the time, however sometimes you have several tabs open either on purpose or by accident, and want to close some of them. (e.g. #101, #105, #266)

But going back into the webapp-manager to edit the "hide navigation bar" option is inconvenient especially when you must do this every single time there are extraneous tabs.

In fact Firefox already has a nice feature that hides the menubar when it's not needed, and shows it only when it's needed - the Alt button.

This PR hooks the rest of the navigation bar onto this mechanism, so pressing Alt will now toggle the menubar+navbars together.

On my version of Firefox (latest) it's not necessary to explicitly style #identity-box, #tabbrowser-tabs since they are inside the other elements, I'm not sure of the purpose of the original code. But that's what this PR & code review is for, to discuss this. :)

@infinity0
Copy link
Copy Markdown
Contributor Author

infinity0 commented Mar 10, 2024

Hm, the behaviour for the tabs isn't the most intuitive. You can right-click on them for the usual context menu but nothing else works (dragging, closing) because Alt puts the focus on the menu bar. I could try to fix this with some javascript in userChrome.js however if you think that's a good idea.

@infinity0
Copy link
Copy Markdown
Contributor Author

Hm, the behaviour for the tabs isn't the most intuitive. You can right-click on them for the usual context menu but nothing else works (dragging, closing) because Alt puts the focus on the menu bar. I could try to fix this with some javascript in userChrome.js however if you think that's a good idea.

The latest commit fixes these issues by only hiding the navbar when the user isn't otherwise interacting with it via :hover, :focus or :active, in addition to checking that the menu bar is inactive. Dragging and closing the tabs now works! No JS required, CSS-only solution.

@mtwebster mtwebster merged commit dc9db13 into linuxmint:master May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants