Skip to content

Commit 26120d8

Browse files
authored
Disable overscroll in all webviews (microsoft#187624)
Fixes microsoft#182013
1 parent 2c4cdea commit 26120d8

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

extensions/markdown-language-features/media/markdown.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ html, body {
99
padding: 0 26px;
1010
line-height: var(--markdown-line-height, 22px);
1111
word-wrap: break-word;
12-
overscroll-behavior-x: none;
1312
}
1413

1514
body {

src/vs/workbench/contrib/webview/browser/pre/index-no-csp.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
1010
</head>
1111

12-
<body style="margin: 0; overflow: hidden; width: 100%; height: 100%" role="document">
12+
<body style="margin: 0; overflow: hidden; width: 100%; height: 100%; overscroll-behavior-x: none;" role="document">
1313
<!-- TODO: Remove additional script tag once Firefox is fixed https://bugzilla.mozilla.org/show_bug.cgi?id=1737882 -->
1414
<script></script>
1515
<script async type="module">
@@ -85,6 +85,7 @@
8585
defaultStyles.id = '_defaultStyles';
8686
defaultStyles.textContent = `
8787
html {
88+
overscroll-behavior-x: none;
8889
scrollbar-color: var(--vscode-scrollbarSlider-background) var(--vscode-editor-background);
8990
}
9091

src/vs/workbench/contrib/webview/browser/pre/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<meta charset="UTF-8">
66

77
<meta http-equiv="Content-Security-Policy"
8-
content="default-src 'none'; script-src 'sha256-7Y08cqii1UgeZbSST9r8UPSownOSMa3/PiKe77avh7I=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
8+
content="default-src 'none'; script-src 'sha256-Rb9injxD1VMV/uzNjbZ78NhEoDuUnHcJBfN1KZ9nE7U=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
99

1010
<!-- Disable pinch zooming -->
1111
<meta name="viewport"
1212
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
1313
</head>
1414

15-
<body style="margin: 0; overflow: hidden; width: 100%; height: 100%" role="document">
15+
<body style="margin: 0; overflow: hidden; width: 100%; height: 100%; overscroll-behavior-x: none;" role="document">
1616
<script async type="module">
1717
// @ts-check
1818
/// <reference lib="dom" />
@@ -86,6 +86,7 @@
8686
defaultStyles.id = '_defaultStyles';
8787
defaultStyles.textContent = `
8888
html {
89+
overscroll-behavior-x: none;
8990
scrollbar-color: var(--vscode-scrollbarSlider-background) var(--vscode-editor-background);
9091
}
9192

0 commit comments

Comments
 (0)