From 4790fd3ff75ace158c47823b5619440d8fd1d879 Mon Sep 17 00:00:00 2001
From: Sam Wilkins <abdullah_ahmed@brown.edu>
Date: Mon, 8 Apr 2019 18:55:53 -0400
Subject: beginning keyboard shortcuts

---
 src/client/util/TooltipTextMenu.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/client/util/TooltipTextMenu.tsx')

diff --git a/src/client/util/TooltipTextMenu.tsx b/src/client/util/TooltipTextMenu.tsx
index 3f37d5fb8..4715fcc14 100644
--- a/src/client/util/TooltipTextMenu.tsx
+++ b/src/client/util/TooltipTextMenu.tsx
@@ -61,7 +61,7 @@ export class TooltipTextMenu {
       //update view of icons
       this.num_icons = 0;
       items.forEach(({ command, dom }) => {
-        if (dom.contains(e.srcElement)) {
+        if (e.srcElement && dom.contains(e.srcElement as Node)) {
           //let active = command(view.state, view.dispatch, view);
           let active = command(view.state, view.dispatch, view);
           //uncomment this if we want the bullet button to disappear if current selection is bulleted
-- 
cgit v1.2.3-70-g09d2

