diff options
author | bobzel <zzzman@gmail.com> | 2020-08-24 11:21:20 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-24 11:21:20 -0400 |
commit | 505ad0d2e2a37795f1877b2319a8ba3a1ce65d28 (patch) | |
tree | 3bc61a2edb944ae0083e38244e4b41ea89cdbbf8 /src/client/views/EditableView.tsx | |
parent | 3058388e7d377d874f4460e9fba3f1ba51127cb0 (diff) |
cleaned up all library() calls to add icons. fixed import styles. fixed keyboard events for presentation views to trigger when no input box is the target.
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r-- | src/client/views/EditableView.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx index a4b059482..d0e6ed463 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -4,11 +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 { PresBox } from './nodes/PresBox'; +import "./EditableView.scss"; export interface EditableProps { /** @@ -172,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 }} @@ -180,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 }} |