Vivaldi's auto-hide sidebars can stay open after you switch to another window. The window loses focus, but the sidebar keeps the visibility state left by the pointer hovering over it.
vivaldi-autohide-fix is an experimental local patch for this case. It targets Vivaldi 8.2.4133.52 on macOS, installed at /Applications/Vivaldi.app.
What changes on focus loss
The window-focus handler in this version updates the window's active state without clearing its hover visibility or hotspot state. The patch changes that handler so an inactive window resets hotSpotStatus to "away" and hides left and right auto-hide wrappers unless their keepOpen flag is set.
Explicitly kept-open sidebars stay open. Top and bottom visibility stays unchanged. When the window gains focus, the added reset does not run.
The script edits Vivaldi's bundled JavaScript directly. It requires exactly one match for the original handler and refuses missing, duplicate, or already patched targets. There are no dependencies to install; the script runs with Bun.
Try Vivaldi's built-in timing controls first
Recent Vivaldi builds expose timing settings for auto-hide. They shorten normal sidebar hiding without changing the application bundle:
- Open Settings and search for
biscuit. - Under Auto-Hide, set Close delay to 100 ms. The default is 800 ms.
- Set Closing animation speed to 100 ms. The default is 300 ms.
These values cut the normal hiding time from roughly 1.1 seconds to 0.2 seconds. If that fixes the delay you are seeing, no extra patch is needed. The settings are unchanged until you edit them.
Apply the patch
Clone the repository and check whether the installed bundle matches:
git clone https://github.com/kacigaya/vivaldi-autohide-fix.git
cd vivaldi-autohide-fix
bun patch.js check
A successful check confirms the expected handler exists. It does not verify browser behavior or whether macOS will accept the modified application.
Quit Vivaldi normally, then apply:
bun patch.js apply
The script saves the original beside bundle.js as bundle.js.autohide-original. If an existing backup differs from the current bundle, it refuses to overwrite it.
Modifying the signed application bundle can invalidate its code signature, and macOS may reject the modified app. The script does not disable signing or security protections.
Check the behavior
Reopen Vivaldi and test with two windows:
- Hover over the right sidebar to reveal it.
- Activate the other window. The first window's sidebar should close.
- Return to the first window and check that hovering reveals the sidebar again.
- Check tab switching, address entry, and sidebars you explicitly keep open.
The project's automated tests cover state transitions and patch matching. They do not exercise the running browser or macOS signature acceptance. This patch also does not address every cause of a sidebar sticking while its window remains active.
Restore before updating
Quit Vivaldi, then restore the original bundle:
bun patch.js restore
Restoration checks that the current bundle is exactly the patched version of the saved original. If the bundle has changed since patching, the script refuses to overwrite it.
Restore before updating Vivaldi. An update may replace the patched bundle, and this script's path and handler match are specific to 8.2.4133.52. A newer version needs a fresh compatibility check.
The repository README documents usage and limits. The patch source contains the exact handler replacement and restoration checks.