Skip to content

Commit 9ce5e09

Browse files
authored
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)
1 parent fc7a2d5 commit 9ce5e09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_src/js/markup/mermaid.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const {mermaidMaxSourceCharacters} = window.config;
33

44
const iframeCss = `
55
:root {color-scheme: normal}
6-
body {margin: 0; padding: 0}
6+
body {margin: 0; padding: 0; overflow: hidden}
77
#mermaid {display: block; margin: 0 auto}
88
`;
99

0 commit comments

Comments
 (0)