aboutsummaryrefslogtreecommitdiff
path: root/src/client/util
diff options
context:
space:
mode:
authorlaurawilsonri <laura_wilson@brown.edu>2019-04-08 18:56:45 -0400
committerlaurawilsonri <laura_wilson@brown.edu>2019-04-08 18:56:45 -0400
commit5d4414e8d2a17c75c808bce9343dba85fbb32440 (patch)
tree4f2249b07c6e2d85056ba1bc5229f99824819d24 /src/client/util
parent218a3bdff2f7c4888b5f21466dee65c36a76ea00 (diff)
parent4790fd3ff75ace158c47823b5619440d8fd1d879 (diff)
Merge branch 'richTextEditor' of https://github.com/browngraphicslab/Dash-Web into richTextEditor
Diffstat (limited to 'src/client/util')
-rw-r--r--src/client/util/RichTextSchema.tsx1
-rw-r--r--src/client/util/TooltipTextMenu.tsx2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index 98c22204a..489c22a57 100644
--- a/src/client/util/RichTextSchema.tsx
+++ b/src/client/util/RichTextSchema.tsx
@@ -9,7 +9,6 @@ import { EditorView, } from "prosemirror-view";
const pDOM: DOMOutputSpecArray = ["p", 0], blockquoteDOM: DOMOutputSpecArray = ["blockquote", 0], hrDOM: DOMOutputSpecArray = ["hr"],
preDOM: DOMOutputSpecArray = ["pre", ["code", 0]], brDOM: DOMOutputSpecArray = ["br"], ulDOM: DOMOutputSpecArray = ["ul", 0]
-
// :: Object
// [Specs](#model.NodeSpec) for the nodes defined in this schema.
export const nodes: { [index: string]: NodeSpec } = {
diff --git a/src/client/util/TooltipTextMenu.tsx b/src/client/util/TooltipTextMenu.tsx
index 8c4470f23..219e7c94d 100644
--- a/src/client/util/TooltipTextMenu.tsx
+++ b/src/client/util/TooltipTextMenu.tsx
@@ -73,7 +73,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