From 529ff3e6fe7e6c1b03fc084f7b2583efe7c68d08 Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Thu, 26 Aug 2021 18:35:22 +0200 Subject: fix: address bar not updating (#1836) --- src/features/webControls/components/WebControls.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/features/webControls/components') diff --git a/src/features/webControls/components/WebControls.js b/src/features/webControls/components/WebControls.js index 9a95eb2d2..bebf52c08 100644 --- a/src/features/webControls/components/WebControls.js +++ b/src/features/webControls/components/WebControls.js @@ -199,12 +199,17 @@ class WebControls extends Component { }) } onFocus={event => { - console.log('on focus event'); event.target.select(); this.setState({ editUrl: true, }); }} + onBlur={event => { + event.target.blur(); + this.setState({ + editUrl: false, + }); + }} onKeyDown={event => { if (event.key === 'Enter') { this.setState({ @@ -217,7 +222,7 @@ class WebControls extends Component { editUrl: false, inputUrl: url, }); - event.target.blur(); + this.inputRef.current.blur(); } }} ref={this.inputRef} -- cgit v1.2.3-70-g09d2