aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/webControls
diff options
context:
space:
mode:
Diffstat (limited to 'src/features/webControls')
-rw-r--r--src/features/webControls/components/WebControls.tsx13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/features/webControls/components/WebControls.tsx b/src/features/webControls/components/WebControls.tsx
index 74b343948..e76fca6a2 100644
--- a/src/features/webControls/components/WebControls.tsx
+++ b/src/features/webControls/components/WebControls.tsx
@@ -34,10 +34,11 @@ const messages = defineMessages({
34 }, 34 },
35}); 35});
36 36
37const buttonTransition = 37const buttonTransition = window?.matchMedia(
38 window && window.matchMedia('(prefers-reduced-motion: no-preference)') 38 '(prefers-reduced-motion: no-preference)',
39 ? 'opacity 0.25s' 39)
40 : 'none'; 40 ? 'opacity 0.25s'
41 : 'none';
41 42
42const styles = theme => ({ 43const styles = theme => ({
43 root: { 44 root: {
@@ -211,7 +212,7 @@ class WebControls extends Component<IProps, IState> {
211 }); 212 });
212 navigate(inputUrl); 213 navigate(inputUrl);
213 214
214 if (this.inputRef && this.inputRef.current) { 215 if (this.inputRef?.current) {
215 this.inputRef.current.blur(); 216 this.inputRef.current.blur();
216 } 217 }
217 } else if (event.key === 'Escape') { 218 } else if (event.key === 'Escape') {
@@ -220,7 +221,7 @@ class WebControls extends Component<IProps, IState> {
220 inputUrl: url, 221 inputUrl: url,
221 }); 222 });
222 223
223 if (this.inputRef && this.inputRef.current) { 224 if (this.inputRef?.current) {
224 this.inputRef.current.blur(); 225 this.inputRef.current.blur();
225 } 226 }
226 } 227 }