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 58479e7ef..c5c320f52 100644 --- a/src/features/quickSwitch/Component.js +++ b/src/features/quickSwitch/Component.js | |||
@@ -1,5 +1,5 @@ | |||
1 | import React, { Component, createRef } from 'react'; | 1 | import React, { Component, createRef } from 'react'; |
2 | import { remote } from 'electron'; | 2 | import { getCurrentWindow } from '@electron/remote'; |
3 | import PropTypes from 'prop-types'; | 3 | import PropTypes from 'prop-types'; |
4 | import { observer, inject } from 'mobx-react'; | 4 | import { observer, inject } from 'mobx-react'; |
5 | import { reaction } from 'mobx'; | 5 | import { reaction } from 'mobx'; |
@@ -244,8 +244,8 @@ export default @injectSheet(styles) @inject('stores', 'actions') @observer class | |||
244 | if (isModalVisible && !this.state.wasPrevVisible) { | 244 | if (isModalVisible && !this.state.wasPrevVisible) { |
245 | // Set focus back on current window if its in a service | 245 | // Set focus back on current window if its in a service |
246 | // TODO: Find a way to gain back focus | 246 | // TODO: Find a way to gain back focus |
247 | remote.getCurrentWindow().blurWebView(); | 247 | getCurrentWindow().blurWebView(); |
248 | remote.getCurrentWindow().webContents.focus(); | 248 | getCurrentWindow().webContents.focus(); |
249 | 249 | ||
250 | // The input "focus" attribute will only work on first modal open | 250 | // The input "focus" attribute will only work on first modal open |
251 | // Manually add focus to the input element | 251 | // Manually add focus to the input element |