Skip to content

Commit 828d4ed

Browse files
disable clicking on links in Live Preview (#1518)
1 parent 9b28007 commit 828d4ed

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/documentation/webview/webview.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ const themeObserver = new ThemeObserver();
2525
themeObserver.updateTheme();
2626
themeObserver.start();
2727

28+
// Disable clicking on links as they do not work
29+
const disableLinks = document.createElement("style");
30+
disableLinks.textContent = `a {
31+
pointer-events: none;
32+
}`;
33+
document.head.appendChild(disableLinks);
34+
2835
// Set up the communication bridges to VS Code and swift-docc-render
2936
createCommunicationBridge().then(async bridge => {
3037
const vscode = acquireVsCodeApi();

0 commit comments

Comments
 (0)