aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PreviewCursor.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-09-06 10:11:23 -0400
committerbob <bcz@cs.brown.edu>2019-09-06 10:11:23 -0400
commiteb05b987d7a1b2ca2e50268a0c15f2de7d44c5bd (patch)
tree50c4963cbd0c2433b4b76d73744b23af7749c532 /src/client/views/PreviewCursor.tsx
parent95f773b56b8ed4fa95b1fd308c19baee1744275a (diff)
cleanup of prosemirror stuff.
Diffstat (limited to 'src/client/views/PreviewCursor.tsx')
-rw-r--r--src/client/views/PreviewCursor.tsx6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/views/PreviewCursor.tsx b/src/client/views/PreviewCursor.tsx
index 1329dc02c..45a8556bf 100644
--- a/src/client/views/PreviewCursor.tsx
+++ b/src/client/views/PreviewCursor.tsx
@@ -93,9 +93,7 @@ export class PreviewCursor extends React.Component<{}> {
@action
onKeyPress = (e: KeyboardEvent) => {
- // Mixing events between React and Native is finicky. In FormattedTextBox, we set the
- // DASHFormattedTextBoxHandled flag when a text box consumes a key press so that we can ignore
- // the keyPress here. 112-
+ // Mixing events between React and Native is finicky.
//if not these keys, make a textbox if preview cursor is active!
if (e.key !== "Escape" && e.key !== "Backspace" && e.key !== "Delete" && e.key !== "CapsLock" &&
e.key !== "Alt" && e.key !== "Shift" && e.key !== "Meta" && e.key !== "Control" &&
@@ -103,7 +101,7 @@ export class PreviewCursor extends React.Component<{}> {
e.key !== "NumLock" &&
(e.keyCode < 112 || e.keyCode > 123) && // F1 thru F12 keys
!e.key.startsWith("Arrow") &&
- !e.defaultPrevented && !(e as any).DASHFormattedTextBoxHandled) {
+ !e.defaultPrevented) {
if (!e.ctrlKey && !e.metaKey) {// /^[a-zA-Z0-9$*^%#@+-=_|}{[]"':;?/><.,}]$/.test(e.key)) {
PreviewCursor.Visible && PreviewCursor._onKeyPress && PreviewCursor._onKeyPress(e);
PreviewCursor.Visible = false;