Fixing netlify

This commit is contained in:
Zef Hemel
2024-01-20 22:53:51 +01:00
parent 9734c0f14c
commit 4133cabd52
11 changed files with 60 additions and 17 deletions
+5
View File
@@ -136,6 +136,11 @@ export class MarkdownWidget extends WidgetType {
}
private attachListeners(div: HTMLElement, buttons?: CodeWidgetButton[]) {
div.addEventListener("mousedown", (e) => {
// CodeMirror overrides mousedown on parent elements to implement its own selection highlighting.
// That's nice, but not for markdown widgets, so let's not propagate the event to CodeMirror here.
e.stopPropagation();
});
// Override wiki links with local navigate (faster)
div.querySelectorAll("a[data-ref]").forEach((el_) => {
const el = el_ as HTMLElement;