From 9618c68ec7d27e01d2854b79d98adfb73362b910 Mon Sep 17 00:00:00 2001
From: silverwind <me@silverwind.io>
Date: Thu, 24 Nov 2022 15:34:13 +0100
Subject: [PATCH] Fix scroll over mermaid frame

When starting a scroll while the mouse is over a mermaid diagram, the
scroll sometimes propagates to the iframe, preventing the parent page
from scrolling. Fix this by disabling scroll inside the iframe.
---
 web_src/js/markup/mermaid.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web_src/js/markup/mermaid.js b/web_src/js/markup/mermaid.js
index 984946045d4f0..efd9abbb56920 100644
--- a/web_src/js/markup/mermaid.js
+++ b/web_src/js/markup/mermaid.js
@@ -3,7 +3,7 @@ const {mermaidMaxSourceCharacters} = window.config;
 
 const iframeCss = `
   :root {color-scheme: normal}
-  body {margin: 0; padding: 0}
+  body {margin: 0; padding: 0; overflow: hidden}
   #mermaid {display: block; margin: 0 auto}
 `;