aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PreviewCursor.tsx
diff options
context:
space:
mode:
authorSam Wilkins <abdullah_ahmed@brown.edu>2019-04-30 16:21:53 -0400
committerSam Wilkins <abdullah_ahmed@brown.edu>2019-04-30 16:21:53 -0400
commit43ed4e7fd2d6120598733e537a301a8f87379239 (patch)
tree2dc0b21a0da4e25b899ab46a8ca512131cb23ccb /src/client/views/PreviewCursor.tsx
parentd99b1be8e44ed2dc65714ea192debf5529e353de (diff)
parentc95e1789da41fb63e27f1086e30c0ebd151009df (diff)
Merge branch 'newDocs' of https://github.com/browngraphicslab/Dash-Web into newDocs
Diffstat (limited to 'src/client/views/PreviewCursor.tsx')
-rw-r--r--src/client/views/PreviewCursor.tsx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/views/PreviewCursor.tsx b/src/client/views/PreviewCursor.tsx
index 744ec0535..4359ba093 100644
--- a/src/client/views/PreviewCursor.tsx
+++ b/src/client/views/PreviewCursor.tsx
@@ -26,12 +26,11 @@ export class PreviewCursor extends React.Component<{}> {
// DASHFormattedTextBoxHandled flag when a text box consumes a key press so that we can ignore
// the keyPress here.
//if not these keys, make a textbox if preview cursor is active!
- if (!e.ctrlKey && !e.altKey && !e.defaultPrevented && !(e as any).DASHFormattedTextBoxHandled) {
- PreviewCursor.Visible && PreviewCursor._onKeyPress && PreviewCursor._onKeyPress(e);
- PreviewCursor.Visible = false;
- } else if (e.ctrlKey) {
- if (e.key == "v") {
+ if (e.key.startsWith("F") && !e.key.endsWith("F")) {
+ } else if (e.key != "Escape" && e.key != "Alt" && e.key != "Shift" && e.key != "Meta" && e.key != "Control" && !e.defaultPrevented && !(e as any).DASHFormattedTextBoxHandled) {
+ if ((!e.ctrlKey && !e.metaKey) || e.key === "v") {
PreviewCursor.Visible && PreviewCursor._onKeyPress && PreviewCursor._onKeyPress(e);
+ PreviewCursor.Visible = false;
}
}
}