diff options
| author | Sam Wilkins <abdullah_ahmed@brown.edu> | 2019-04-08 18:55:53 -0400 |
|---|---|---|
| committer | Sam Wilkins <abdullah_ahmed@brown.edu> | 2019-04-08 18:55:53 -0400 |
| commit | 4790fd3ff75ace158c47823b5619440d8fd1d879 (patch) | |
| tree | 406f432176bd580ff210fb447df0ddfa6af27ce4 /src/client/util | |
| parent | b3246c495a1e116abe7ab7abea347126eead4e0d (diff) | |
beginning keyboard shortcuts
Diffstat (limited to 'src/client/util')
| -rw-r--r-- | src/client/util/RichTextSchema.tsx | 1 | ||||
| -rw-r--r-- | src/client/util/TooltipTextMenu.tsx | 2 |
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 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 |
