summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2022-11-24 21:56:57 +0100
committerGitHub <noreply@github.com>2022-11-24 20:56:57 +0000
commit9ce5e092f3f0e0048c49419c4ccd886e817a764f (patch)
tree6339064c0230e58565ed0bf2d281edf8c1385523 /web_src
parentfc7a2d5a959334f7195571a3e1db669ed7667a28 (diff)
downloadgitea-9ce5e092f3f0e0048c49419c4ccd886e817a764f.tar.gz
gitea-9ce5e092f3f0e0048c49419c4ccd886e817a764f.zip
Fix scroll over mermaid frame (#21925)
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. This is not a problem because those frames are never meant to scroll. Bug seems to affect Firefox only. ![scroll](https://user-images.githubusercontent.com/115237/203847578-6831e3c8-9df4-4577-8501-822fb9ea1278.gif)
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/markup/mermaid.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/markup/mermaid.js b/web_src/js/markup/mermaid.js
index 984946045d..efd9abbb56 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}
`;