Skip to content

Commit

Permalink
Disable overscroll in all webviews
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Jul 11, 2023
1 parent 2c4cdea commit 2f36e89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion extensions/markdown-language-features/media/markdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ html, body {
padding: 0 26px;
line-height: var(--markdown-line-height, 22px);
word-wrap: break-word;
overscroll-behavior-x: none;
}

body {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
</head>

<body style="margin: 0; overflow: hidden; width: 100%; height: 100%" role="document">
<body style="margin: 0; overflow: hidden; width: 100%; height: 100%; overscroll-behavior-x: none;" role="document">
<!-- TODO: Remove additional script tag once Firefox is fixed https://bugzilla.mozilla.org/show_bug.cgi?id=1737882 -->
<script></script>
<script async type="module">
Expand Down Expand Up @@ -85,6 +85,7 @@
defaultStyles.id = '_defaultStyles';
defaultStyles.textContent = `
html {
overscroll-behavior-x: none;
scrollbar-color: var(--vscode-scrollbarSlider-background) var(--vscode-editor-background);
}
Expand Down
5 changes: 3 additions & 2 deletions src/vs/workbench/contrib/webview/browser/pre/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<meta charset="UTF-8">

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

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

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

0 comments on commit 2f36e89

Please sign in to comment.