From 1d47f6cc8be84ab368ad91f287909ee162d1f2e2 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 27 Mar 2024 15:42:12 -0400
Subject: fixed toggling footnotes.  fixed error in bullet hit test.  fixed
 problems with backspace and enter in prosemirror transfer.  fixed display of
 markdown options to start at top.

---
 src/client/views/nodes/formattedText/FootnoteView.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/client/views/nodes/formattedText/FootnoteView.tsx')

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() {
-- 
cgit v1.2.3-70-g09d2

