Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable overscroll in all webviews #187624

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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