diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-06-23 10:35:11 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-06-23 10:35:11 -0400 |
commit | 494a79d5f3ba18c31c3fa09e9c939734b79431ac (patch) | |
tree | ec72755f96294ac98ff5739da594086375b74d3a /src | |
parent | 87150752e9ec0b984209a3e4fa757dfee18a788b (diff) |
fixed weburl input box not getting focus to type
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/WebBox.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index b726a6df9..71e8d2778 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -41,7 +41,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<FieldViewProps, WebDocum @observable private _url: string = "hello"; @observable private _pressX: number = 0; @observable private _pressY: number = 0; - + private _keyInput = React.createRef<HTMLInputElement>(); private _longPressSecondsHack?: NodeJS.Timeout; private _outerRef = React.createRef<HTMLDivElement>(); private _iframeRef = React.createRef<HTMLIFrameElement>(); @@ -237,6 +237,11 @@ export class WebBox extends ViewBoxAnnotatableComponent<FieldViewProps, WebDocum onDragOver={this.onUrlDragover} onChange={this.onURLChange} onKeyDown={this.onValueKeyDown} + onClick={(e) => { + this._keyInput.current!.select(); + e.stopPropagation(); + }} + ref={this._keyInput} /> <div style={{ display: "flex", |