From 93c50b6ea3b24994d836ad24c8476c9f9012a089 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 8 Oct 2020 21:57:50 -0400
Subject: added direct typing of notes into stacking columns in text box
 sidebar.

---
 src/client/views/EditableView.tsx | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'src/client/views/EditableView.tsx')

diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx
index d35271ffd..8b1b12365 100644
--- a/src/client/views/EditableView.tsx
+++ b/src/client/views/EditableView.tsx
@@ -47,6 +47,7 @@ export interface EditableProps {
     onClick?: (e: React.MouseEvent) => boolean;
     isEditingCallback?: (isEditing: boolean) => void;
     menuCallback?: (x: number, y: number) => void;
+    textCallback?: (char: string) => boolean;
     showMenuOnLoad?: boolean;
     HeadingObject?: SchemaHeaderField | undefined;
     toggle?: () => void;
@@ -119,6 +120,12 @@ export class EditableView extends React.Component<EditableProps> {
             case ":":
                 this.props.menuCallback?.(e.currentTarget.getBoundingClientRect().x, e.currentTarget.getBoundingClientRect().y);
                 break;
+            case "Shift": case "Alt": case "Meta": case "Control": break;
+            default:
+                if (this.props.textCallback?.(e.key)) {
+                    this._editing = false;
+                    this.props.isEditingCallback?.(false,);
+                }
         }
     }
 
-- 
cgit v1.2.3-70-g09d2

