aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText/FootnoteView.tsx
diff options
context:
space:
mode:
authoraidahosa1 <aisosa_idahosa@brown.edu>2024-05-07 17:37:36 -0400
committeraidahosa1 <aisosa_idahosa@brown.edu>2024-05-07 17:37:36 -0400
commit4788b30975a996d1860b8978f482973fdcc920fe (patch)
treed4f245f0cbbe18c63c19f77b49a77e822a0cbbc6 /src/client/views/nodes/formattedText/FootnoteView.tsx
parent8ca77556c3a9caba66faf37fbf259762c2084c0b (diff)
parent2caf7b7bb80b663b6ba585f88cdbd2d725f8505e (diff)
Merge branch 'master' into aisosa-starter
Diffstat (limited to 'src/client/views/nodes/formattedText/FootnoteView.tsx')
-rw-r--r--src/client/views/nodes/formattedText/FootnoteView.tsx4
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() {