aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/EditableView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-08-24 11:51:41 -0400
committerGitHub <noreply@github.com>2020-08-24 11:51:41 -0400
commit28226924bab8a82b4d2b60d49b63296cbb25658b (patch)
tree0d2951df140115047aec79ec90285117b3a29ef0 /src/client/views/EditableView.tsx
parenta9e08e0504e8002bc5d991b6a13777577ddd8f9f (diff)
parenta6728f81c8192c910ed1f2b70091c39634aca05c (diff)
Merge pull request #645 from browngraphicslab/presentation_updates
Presentation updates
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r--src/client/views/EditableView.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx
index b96802f06..d0e6ed463 100644
--- a/src/client/views/EditableView.tsx
+++ b/src/client/views/EditableView.tsx
@@ -4,10 +4,8 @@ import { observer } from 'mobx-react';
import * as Autosuggest from 'react-autosuggest';
import { ObjectField } from '../../fields/ObjectField';
import { SchemaHeaderField } from '../../fields/SchemaHeaderField';
-import "./EditableView.scss";
import { DragManager } from '../util/DragManager';
-import { ComputedField } from '../../fields/ScriptField';
-import { FieldValue } from '../../fields/Types';
+import "./EditableView.scss";
export interface EditableProps {
/**
@@ -171,6 +169,7 @@ export class EditableView extends React.Component<EditableProps> {
onPointerDown: this.stopPropagation,
onClick: this.stopPropagation,
onPointerUp: this.stopPropagation,
+ onKeyPress: this.stopPropagation,
value: this.props.autosuggestProps.value,
onChange: this.props.autosuggestProps.onChange
}}
@@ -179,6 +178,10 @@ export class EditableView extends React.Component<EditableProps> {
defaultValue={this.props.GetValue()}
onKeyDown={this.onKeyDown}
autoFocus={true}
+ onKeyPress={e => {
+ e.stopPropagation();
+ (e.nativeEvent as any).Aaaa = 3;
+ }}
onBlur={e => this.finalizeEdit(e.currentTarget.value, false, true)}
onPointerDown={this.stopPropagation} onClick={this.stopPropagation} onPointerUp={this.stopPropagation}
style={{ display: this.props.display, fontSize: this.props.fontSize, minWidth: 20 }}