aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/webControls/components/WebControls.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/features/webControls/components/WebControls.js')
-rw-r--r--src/features/webControls/components/WebControls.js9
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}