diff options
Diffstat (limited to 'src/features/quickSwitch/Component.js')
-rw-r--r-- | src/features/quickSwitch/Component.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/features/quickSwitch/Component.js b/src/features/quickSwitch/Component.js index df2bf968d..f21db0ebd 100644 --- a/src/features/quickSwitch/Component.js +++ b/src/features/quickSwitch/Component.js | |||
@@ -140,7 +140,7 @@ class QuickSwitchModal extends Component { | |||
140 | let services = []; | 140 | let services = []; |
141 | if ( | 141 | if ( |
142 | this.state.search && | 142 | this.state.search && |
143 | compact(invoke(this.state.search, 'match', /^[a-z0-9]/i)).length > 0 | 143 | compact(invoke(this.state.search, 'match', /^[\da-z]/i)).length > 0 |
144 | ) { | 144 | ) { |
145 | // Apply simple search algorythm to list of all services | 145 | // Apply simple search algorythm to list of all services |
146 | services = this.props.stores.services.allDisplayed; | 146 | services = this.props.stores.services.allDisplayed; |
@@ -261,7 +261,7 @@ class QuickSwitchModal extends Component { | |||
261 | // Wrapped inside timeout to let the modal render first | 261 | // Wrapped inside timeout to let the modal render first |
262 | setTimeout(() => { | 262 | setTimeout(() => { |
263 | if (this.inputRef.current) { | 263 | if (this.inputRef.current) { |
264 | this.inputRef.current.getElementsByTagName('input')[0].focus(); | 264 | this.inputRef.current.querySelectorAll('input')[0].focus(); |
265 | } | 265 | } |
266 | }, 10); | 266 | }, 10); |
267 | 267 | ||
@@ -273,7 +273,7 @@ class QuickSwitchModal extends Component { | |||
273 | // search query change when modal not visible | 273 | // search query change when modal not visible |
274 | setTimeout(() => { | 274 | setTimeout(() => { |
275 | if (this.inputRef.current) { | 275 | if (this.inputRef.current) { |
276 | this.inputRef.current.getElementsByTagName('input')[0].blur(); | 276 | this.inputRef.current.querySelectorAll('input')[0].blur(); |
277 | } | 277 | } |
278 | }, 100); | 278 | }, 100); |
279 | 279 | ||