Disclaimer
Is this project open source? Yes
Is this project completely free? Yes
Is this project vibe-coded beyond the author’s ability to comprehend how it works? No
Community Directory: N/A (CSS snippet, not a plugin or theme)
Found this completely by accident while messing with CSS snippets, so full disclosure, I didn’t understand why it worked until I went digging afterward.
If you scroll a list (file explorer, ribbon, search suggestions, whatever) with your mouse wheel instead of moving the cursor, sometimes a hover highlight gets stuck on an item and just sits there even after your mouse isn’t anywhere near it. Dug around a bit after the fact: mouseleave just doesn’t fire when the element under your cursor changes because of scrolling instead of actual mouse movement, so the browser never tells the old element to drop the hover state. Chromium bug, apparently been around for a while.
What fixed it for me: forcing a GPU layer recompose on the elements that can get stuck. Drop this in a CSS snippet (Settings → Appearance → CSS snippets):
/*
* Author: waldemar-one
* GitHub: https://github.com/waldemar-one/obsidian-phantom-hover-fix
*
* Fix: Phantom hover highlight in Obsidian
*
* Problem: Chromium bug — hover state gets stuck on elements after
* scrolling with mouse wheel because mouseleave event is not fired.
*
* Fix: transform: translateZ(0) forces GPU layer recomposition
* which clears the stuck hover state.
*
* Side effect: translateZ(0) breaks positioning of .input-right-decorator
* (keyboard icon in hotkey search field shifts down).
* Fixed by restoring its original translateY(-50%) below.
*/
.nav-file-title,
.nav-folder-title,
.tree-item-self,
.clickable-icon,
.nav-action-button,
.side-dock-ribbon-action,
.workspace-tab-header,
.suggestion-item,
.search-result-file-match,
.bases-toolbar-item,
.menu-item {
will-change: background-color;
transform: translateZ(0);
}
.input-right-decorator {
transform: translateY(-50%) !important;
}
Only catch: doing this to .clickable-icon also shoves the keyboard shortcut icon in the hotkey search field out of place. The snippet above already fixes that part too, so just copy the whole thing.
If it doesn’t work for you or breaks something else, open an issue on the repo or just reply here, happy to take a look.
Tested on Windows 11 25H2, Obsidian 1.12.7.
Repo’s here if you want to keep an eye on it: waldemar-one/obsidian-phantom-hover-fix