diff options
author | Zachary Zhang <zacharyzhang7@gmail.com> | 2024-04-02 16:37:22 -0400 |
---|---|---|
committer | Zachary Zhang <zacharyzhang7@gmail.com> | 2024-04-02 16:37:22 -0400 |
commit | 427406dc60f0f037d69e0992fbb3205476daf89e (patch) | |
tree | b19538c66ade34ab4d2684589dbb8604a613e7ff /src/client/views/nodes/formattedText/FootnoteView.tsx | |
parent | dc0ee4595e37042db3adf60b002d7baf77cb24ae (diff) | |
parent | 3d158bb9b941a3fcb1b486f354ca5c9195dd21c2 (diff) |
Merge branch 'master' into zach-starter
Diffstat (limited to 'src/client/views/nodes/formattedText/FootnoteView.tsx')
-rw-r--r-- | src/client/views/nodes/formattedText/FootnoteView.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/FootnoteView.tsx b/src/client/views/nodes/formattedText/FootnoteView.tsx index cf48e1250..b327e5137 100644 --- a/src/client/views/nodes/formattedText/FootnoteView.tsx +++ b/src/client/views/nodes/formattedText/FootnoteView.tsx @@ -23,6 +23,7 @@ export class FootnoteView { this.dom = document.createElement('footnote'); this.dom.addEventListener('pointerup', this.toggle, true); + this.dom.addEventListener('mouseup', (e: MouseEvent) => e.stopPropagation(), true); // These are used when the footnote is selected this.innerView = null; } @@ -82,9 +83,10 @@ export class FootnoteView { document.removeEventListener('pointerup', this.ignore, true); }; - toggle = () => { + toggle = (e: PointerEvent) => { if (this.innerView) this.close(); else this.open(); + e.stopPropagation(); }; close() { |