diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2023-07-18 01:06:08 -0400 |
---|---|---|
committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2023-07-18 01:06:08 -0400 |
commit | 12d1a17f4151a4f1c2a5a49287e65be7794a622c (patch) | |
tree | dbc93432569d1290ee26e914d78efa8c7b770379 /src | |
parent | 75a7c44f9615c4ac024403011a968f8b3038c500 (diff) |
fixed lightbox view
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/EditableView.tsx | 40 | ||||
-rw-r--r-- | src/client/views/MainView.tsx | 2 |
2 files changed, 16 insertions, 26 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx index 4deed5ed9..4a986cb54 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -232,32 +232,22 @@ export class EditableView extends React.Component<EditableProps> { onChange: this.props.autosuggestProps.onChange, }} /> - ) : <EditableText - // oneLine={this.props.oneLine && this.props.GetValue()?.toString().indexOf('\n') === -1} - editing={true} - onEdit={function (newText: string): void { - throw new Error('Function not implemented.'); - } } - setEditing={function (editing: boolean): void { - throw new Error('Function not implemented.'); - } } - // onEdit={this.onChange} + ) : + <input + className="editableView-input" + ref={r => (this._inputref = r)} + style={{ display: this.props.display, overflow: 'auto', fontSize: this.props.fontSize, minWidth: 20, background: this.props.background }} + placeholder={this.props.placeholder} + onBlur={e => this.finalizeEdit(e.currentTarget.value, false, true, false)} + defaultValue={this.props.GetValue()} + autoFocus={true} + onChange={this.onChange} + onKeyDown={this.onKeyDown} + onKeyPress={this.stopPropagation} + onPointerDown={this.stopPropagation} + onClick={this.stopPropagation} + onPointerUp={this.stopPropagation} /> - // // <input - // // className="editableView-input" - // // ref={r => (this._inputref = r)} - // // style={{ display: this.props.display, overflow: 'auto', fontSize: this.props.fontSize, minWidth: 20, background: this.props.background }} - // // placeholder={this.props.placeholder} - // // onBlur={e => this.finalizeEdit(e.currentTarget.value, false, true, false)} - // // defaultValue={this.props.GetValue()} - // // autoFocus={true} - // // onChange={this.onChange} - // // onKeyDown={this.onKeyDown} - // // onKeyPress={this.stopPropagation} - // // onPointerDown={this.stopPropagation} - // // onClick={this.stopPropagation} - // // onPointerUp={this.stopPropagation} - // // /> // ) : ( // <textarea // className="editableView-input" diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 6e7498ebc..28f0ad0c8 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -1020,7 +1020,7 @@ export class MainView extends React.Component { <InkTranscription /> {this.snapLines} <LightboxView key="lightbox" PanelWidth={this._windowWidth} PanelHeight={this._windowHeight} maxBorder={[200, 50]} /> - <NewLightboxView key="newLightbox" PanelWidth={this._windowWidth} PanelHeight={this._windowHeight} maxBorder={[200, 50]} /> + {/* <NewLightboxView key="newLightbox" PanelWidth={this._windowWidth} PanelHeight={this._windowHeight} maxBorder={[200, 50]} /> */} </div> ); } |