diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/DocumentDecorations.scss | 2 | ||||
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 15 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/client/views/DocumentDecorations.scss b/src/client/views/DocumentDecorations.scss index 5c99c52ea..9bafbda44 100644 --- a/src/client/views/DocumentDecorations.scss +++ b/src/client/views/DocumentDecorations.scss @@ -33,6 +33,6 @@ background: lightblue; grid-column-start:1; grid-column-end: 4; - cursor: ne-resize; + pointer-events: auto; } }
\ No newline at end of file diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index dcfedfcd1..b44e32c52 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -8,7 +8,7 @@ import ContentEditable from 'react-contenteditable' import { KeyStore } from '../../fields/Key' @observer -export class DocumentDecorations extends React.Component { +export class DocumentDecorations extends React.Component<{}, { value: string }> { static Instance: DocumentDecorations private _resizer = "" private _isPointerDown = false; @@ -17,12 +17,13 @@ export class DocumentDecorations extends React.Component { constructor(props: Readonly<{}>) { super(props) DocumentDecorations.Instance = this - this.state = { html: "hi" }; + this.state = { value: document.title }; + this.handleChange = this.handleChange.bind(this); } - // handleChange = evt => { - // this.setState({ html: evt.target.value }); - // }; + handleChange(event: any) { + this.setState({ value: event.target.value }); + }; @computed get Bounds(): { x: number, y: number, b: number, r: number } { @@ -146,8 +147,8 @@ export class DocumentDecorations extends React.Component { top: bounds.y - 20 - 20, opacity: this.opacity }}> - {/*<input className="title" name="dynbox" value="hey" onPointerDown={this.onPointerDown} />*/} - <div className="title" onPointerDown={this.onPointerDown}>{document.title}</div> + <input className="title" type="text" name="dynbox" value={this.state.value} onChange={this.handleChange} onPointerDown={this.onPointerDown} /> + {/* <div className="title" onPointerDown={this.onPointerDown}>{document.title}</div> */} <div id="documentDecorations-topLeftResizer" className="documentDecorations-resizer" onPointerDown={this.onPointerDown} onContextMenu={(e) => e.preventDefault()}></div> <div id="documentDecorations-topResizer" className="documentDecorations-resizer" onPointerDown={this.onPointerDown} onContextMenu={(e) => e.preventDefault()}></div> <div id="documentDecorations-topRightResizer" className="documentDecorations-resizer" onPointerDown={this.onPointerDown} onContextMenu={(e) => e.preventDefault()}></div> |