obsidian-phantom-hover-fix
Fix for Obsidian phantom hover highlight bug caused by Chromium not firing mouseleave event on mouse wheel scroll
Obsidian Phantom Hover Fix
Fix for the phantom hover highlight bug in Obsidian when scrolling with the mouse wheel.
Problem
After scrolling with the mouse wheel, the hover state gets stuck on navigation elements and does not disappear — a phantom highlight remains. Reproduces on any theme.
The cause is a long-standing Chromium bug (reported in 2014). When scrolling with the mouse wheel, the browser does not fire the mouseleave event because the cursor did not physically move, so the hover state just freezes. Since Obsidian is built on Electron (Chromium), the bug is present here as well.
Reproduction
- Open the file explorer sidebar
- Hover over any file — it highlights
- Scroll with the mouse wheel without moving the cursor
- The hover highlight stays stuck on the element
Solution
transform: translateZ(0) forces GPU compositing layer recreation and clears the stuck hover state. Side effect — the keyboard icon in the hotkey search field shifts down due to a transform conflict, fixed with a separate rule.
Installation
- Download
fix-hover.css - Place the file in the
.obsidian/snippetsfolder inside your vault - Open Obsidian, go to
Settings→Appearance→CSS snippets - Enable
fix-hover
Compatibility
Works with any theme. Tested on many themes: Minimal, Primary, Things, and others.
Feedback
If you notice any broken elements after installing — open an Issue.
How to Install
- Download the repository ZIP below
- Unzip it and find the CSS snippet file
- Move the CSS file into your vault's
.obsidian/snippets/folder - Open Obsidian → Settings → Appearance → CSS Snippets → Enable it
Stats
Stars
4
Forks
0
Last updated 3h ago
Categories
Tags