diff options
| author | Sam Wilkins <abdullah_ahmed@brown.edu> | 2019-05-16 13:13:50 -0400 | 
|---|---|---|
| committer | Sam Wilkins <abdullah_ahmed@brown.edu> | 2019-05-16 13:13:50 -0400 | 
| commit | 4dacd1220e6a0ef73167f187f52f3b4c222c2586 (patch) | |
| tree | 12d481d4d421fda6bd4490af4d0b5d77c6c1131c /src/client/views/PreviewCursor.tsx | |
| parent | 3451ce40cbd488cede7d29b6e39594f740e366b5 (diff) | |
| parent | 53351f6c5b448b93f2865eb38868bddb95ec4c1d (diff) | |
pulled from master and resolved
Diffstat (limited to 'src/client/views/PreviewCursor.tsx')
| -rw-r--r-- | src/client/views/PreviewCursor.tsx | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/src/client/views/PreviewCursor.tsx b/src/client/views/PreviewCursor.tsx index 78024a58c..4218ea7c9 100644 --- a/src/client/views/PreviewCursor.tsx +++ b/src/client/views/PreviewCursor.tsx @@ -18,6 +18,13 @@ export class PreviewCursor extends React.Component<{}> {      constructor(props: any) {          super(props);          document.addEventListener("keydown", this.onKeyPress); +        document.addEventListener("paste", this.paste); +    } +    paste = (e: ClipboardEvent) => { +        console.log(e.clipboardData); +        console.log(e.clipboardData.getData("text/html")); +        console.log(e.clipboardData.getData("text/csv")); +        console.log(e.clipboardData.getData("text/plain"));      }      @action @@ -28,7 +35,7 @@ export class PreviewCursor extends React.Component<{}> {          //if not these keys, make a textbox if preview cursor is active!          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" || e.key === "q") { +            if ((!e.ctrlKey && !e.metaKey) || (e.key >= "a" && e.key <= "z")) {                  PreviewCursor.Visible && PreviewCursor._onKeyPress && PreviewCursor._onKeyPress(e);                  PreviewCursor.Visible = false;              } | 
