Skip to content

Instantly share code, notes, and snippets.

@donghee
Created August 19, 2026 04:10
Show Gist options
  • Select an option

  • Save donghee/b8522120934b9709e59f74751ed2e5ce to your computer and use it in GitHub Desktop.

Select an option

Save donghee/b8522120934b9709e59f74751ed2e5ce to your computer and use it in GitHub Desktop.
Figma Linux Middle-Click Fix
// ==UserScript==
// @name Figma Linux Middle-Click Fix
// @namespace http://tampermonkey.net
// @version 1.0
// @match https://www.figma.com/*
// @run-at document-start
// @grant none
// ==/UserScript==
(function() {
'use strict';
window.addEventListener('mousedown', function(e) {
if (e.button === 1) { // Middle mouse button
// Prevent middle click paste / default behavior if dragging canvas
e.preventDefault();
}
}, true);
window.addEventListener('auxclick', function(e) {
if (e.button === 1) {
e.stopPropagation();
}
}, true);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment