obsidian-phantom-hover-fix

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.

hover-but

Reproduction

  1. Open the file explorer sidebar
  2. Hover over any file — it highlights
  3. Scroll with the mouse wheel without moving the cursor
  4. 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

  1. Download fix-hover.css
  2. Place the file in the .obsidian/snippets folder inside your vault
  3. Open Obsidian, go to SettingsAppearanceCSS snippets
  4. 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.

Related

How to Install

  1. Download the repository ZIP below
  2. Unzip it and find the CSS snippet file
  3. Move the CSS file into your vault's .obsidian/snippets/ folder
  4. Open Obsidian → Settings → Appearance → CSS Snippets → Enable it

Stats

Stars

4

Forks

0

Last updated 3h ago

Categories

Tags

chromiumfixobsidianobsidian-cssobsidian-css-snippet