From e30535a975c298e03aa25d71b81fecb4f6bbf873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Cocchi?= Date: Sun, 6 Feb 2022 16:04:39 +0100 Subject: [PATCH] ignore autofocus issues on mobiles (disabled by design) --- web/src/search-box.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/web/src/search-box.js b/web/src/search-box.js index 5df18e5..cce2032 100644 --- a/web/src/search-box.js +++ b/web/src/search-box.js @@ -19,7 +19,6 @@ export function shouldAutofocusSearchBar() { return localStorage.mauAutofocusSearchBar === 'true' } -const SEARCHBOX_CLASSNAME = 'search-box' export class SearchBox extends Component { constructor(props) { @@ -34,14 +33,6 @@ export class SearchBox extends Component { this.clearSearch = this.clearSearch.bind(this) } - componentDidMount() { - // required for firefox / webview usage in mobile clients - const inputInWebView = document.querySelector(`.${SEARCHBOX_CLASSNAME} input`) - if (inputInWebView && this.autofocus) { - setTimeout(() => inputInWebView.focus(), 100) - } - } - componentWillReceiveProps(props) { this.value = props.value } @@ -67,11 +58,12 @@ export class SearchBox extends Component { const iconToDisplay = `icon-${isEmpty ? 'search' : 'reset'}` return html` -
+