Stuck Preview Fix

Stops stuck video previews on YouTube after middle-click or right-clicking a video to open it in a new tab.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
sameraskar
Daily installs
0
Total installs
0
Ratings
0 0 0
Version
1.0.0
Created
2026-08-30
Updated
2026-08-30
Size
2.98 KB
License
MIT
Applies to

Stuck Preview Fixfor YT


Stuck Preview Fix fixes a YouTube desktop bug where an inline video preview can keep playing on the original page after you open that video in a new tab.


This commonly happens when using middle-click on a video thumbnail or title, or when using the browser's right-click → Open link in new tab option.


What problem does it fix?

Normally, the behavior looks like this:

  1. Hover over a video thumbnail.
  2. YouTube starts playing the inline preview.
  3. Middle-click the video, or open it in a new tab from the context menu.
  4. The new tab opens correctly.
  5. The preview on the original YouTube page keeps playing instead of stopping.


Clicking an empty area of the page usually stops the preview manually.
This script performs the required cleanup automatically.

What the script does

  • Detects middle-clicks on YouTube video links and cards.
  • Detects right-clicks on video links and cards.
  • Clears the stuck preview interaction state.
  • Stops only the relevant inline preview.
  • Keeps YouTube's normal Video previews feature enabled.
  • Does not interfere with normal left-click navigation.
  • Does not intentionally pause the main video player on a watch page.

Where it is useful

The problem can appear on pages such as:

  • YouTube Home
  • Channel → Videos pages
  • Subscriptions
  • Search results
  • Other YouTube pages containing video cards with inline previews

How to use the userscript


There are no settings or buttons to configure.

  1. Install the script using Tampermonkey, Violentmonkey, or another compatible userscript manager.
  2. Reload any open YouTube tabs.
  3. Use YouTube normally.


When you middle-click or right-click a video that has an active preview, the script automatically performs the cleanup in the background.

Also available as a browser extension


Prefer a normal browser extension instead of a userscript manager?
Stuck Preview Fix is also available as a Manifest V3 browser extension
for Chrome, Microsoft Edge, and other Chromium-based browsers.


The extension and userscript use the same core fix and are maintained together as an open-source project.


Source code, extension downloads, releases, documentation, and bug reports:


https://github.com/sameraskar/Stuck-Preview-Fix-for-YouTube


You can download the latest packaged browser extension from the project's GitHub Releases page, or inspect and build the complete source code yourself.

What this script does not do

  • It does not disable video previews.
  • It does not modify YouTube recommendations.
  • It does not block ads.
  • It does not modify video playback quality.
  • It does not change your YouTube account settings.
  • It does not inject advertisements or promotional content.

Privacy


Stuck Preview Fix is intentionally small and privacy-friendly.

  • No analytics
  • No tracking
  • No telemetry
  • No cookies
  • No stored user data
  • No external libraries
  • No network requests
  • No remote executable code


Everything the script does happens locally in your browser on YouTube pages.

Why does this happen?


YouTube appears to use internal interaction state to control thumbnail previews.
Normal left-click navigation clears that state, but middle-click and the browser's native context menu can bypass part of YouTube's normal cleanup process.


The result is a preview that remains active even though the video was opened in another tab.


Stuck Preview Fix does not modify YouTube's internal application code. Instead, it performs a small local cleanup after the relevant mouse interaction.

Compatibility

Designed for desktop YouTube with modern browsers, including:

  • Google Chrome
  • Microsoft Edge
  • Chromium-based browsers
  • Thorium


The userscript should also work with other browsers that support compatible userscript managers, although not every browser/version has been tested.

Bug reports and contributions


YouTube frequently changes its page structure, so a future YouTube update may require this project to be adjusted.


If the fix stops working, please report the problem on GitHub:



GitHub Issues

Please include:

  • Your browser and version
  • Your userscript manager, if using the userscript version
  • The YouTube page where it happened
  • Whether you used middle-click or right-click
  • Whether clicking empty space manually still stops the preview


Open source:
The complete source code for both the userscript and browser extension is publicly available on GitHub.
Bug reports, pull requests, and improvements are welcome.



View Stuck Preview Fix on GitHub



This project is an independent utility and is not affiliated with, endorsed by, or sponsored by YouTube or Google.