diff options
author | Markus Hatvan <markus_hatvan@aon.at> | 2021-08-26 18:35:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-26 18:35:22 +0200 |
commit | 529ff3e6fe7e6c1b03fc084f7b2583efe7c68d08 (patch) | |
tree | 4486cc374508954e235d02d6df81c3c1aaec6205 /src | |
parent | docs: update changelog with new tag name [skip ci] (diff) | |
download | ferdium-app-529ff3e6fe7e6c1b03fc084f7b2583efe7c68d08.tar.gz ferdium-app-529ff3e6fe7e6c1b03fc084f7b2583efe7c68d08.tar.zst ferdium-app-529ff3e6fe7e6c1b03fc084f7b2583efe7c68d08.zip |
fix: address bar not updating (#1836)
Diffstat (limited to 'src')
-rw-r--r-- | src/features/webControls/components/WebControls.js | 9 |
1 files changed, 7 insertions, 2 deletions
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 { | |||
199 | }) | 199 | }) |
200 | } | 200 | } |
201 | onFocus={event => { | 201 | onFocus={event => { |
202 | console.log('on focus event'); | ||
203 | event.target.select(); | 202 | event.target.select(); |
204 | this.setState({ | 203 | this.setState({ |
205 | editUrl: true, | 204 | editUrl: true, |
206 | }); | 205 | }); |
207 | }} | 206 | }} |
207 | onBlur={event => { | ||
208 | event.target.blur(); | ||
209 | this.setState({ | ||
210 | editUrl: false, | ||
211 | }); | ||
212 | }} | ||
208 | onKeyDown={event => { | 213 | onKeyDown={event => { |
209 | if (event.key === 'Enter') { | 214 | if (event.key === 'Enter') { |
210 | this.setState({ | 215 | this.setState({ |
@@ -217,7 +222,7 @@ class WebControls extends Component { | |||
217 | editUrl: false, | 222 | editUrl: false, |
218 | inputUrl: url, | 223 | inputUrl: url, |
219 | }); | 224 | }); |
220 | event.target.blur(); | 225 | this.inputRef.current.blur(); |
221 | } | 226 | } |
222 | }} | 227 | }} |
223 | ref={this.inputRef} | 228 | ref={this.inputRef} |