diff options
author | Dominik Guzei <dominik.guzei@gmail.com> | 2019-03-08 17:34:27 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2019-03-08 08:34:27 -0800 |
commit | baa45d935540601c07977e4d786e0953165cf1fa (patch) | |
tree | eee0423829cd4b8fb6306620edd8e85bc6fdaed8 /src/stores | |
parent | fix(Linux): Fix minimized window focusing (#1304) (@skoruppa) (diff) | |
download | ferdium-app-baa45d935540601c07977e4d786e0953165cf1fa.tar.gz ferdium-app-baa45d935540601c07977e4d786e0953165cf1fa.tar.zst ferdium-app-baa45d935540601c07977e4d786e0953165cf1fa.zip |
Fix/service webview unmounting (#1328)
* detach service when underlying webview unmounts
* disable no-param-reassign eslint rule
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/ServicesStore.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index c63bef196..69e616f0c 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -44,6 +44,7 @@ export default class ServicesStore extends Store { | |||
44 | this.actions.service.deleteService.listen(this._deleteService.bind(this)); | 44 | this.actions.service.deleteService.listen(this._deleteService.bind(this)); |
45 | this.actions.service.clearCache.listen(this._clearCache.bind(this)); | 45 | this.actions.service.clearCache.listen(this._clearCache.bind(this)); |
46 | this.actions.service.setWebviewReference.listen(this._setWebviewReference.bind(this)); | 46 | this.actions.service.setWebviewReference.listen(this._setWebviewReference.bind(this)); |
47 | this.actions.service.detachService.listen(this._detachService.bind(this)); | ||
47 | this.actions.service.focusService.listen(this._focusService.bind(this)); | 48 | this.actions.service.focusService.listen(this._focusService.bind(this)); |
48 | this.actions.service.focusActiveService.listen(this._focusActiveService.bind(this)); | 49 | this.actions.service.focusActiveService.listen(this._focusActiveService.bind(this)); |
49 | this.actions.service.toggleService.listen(this._toggleService.bind(this)); | 50 | this.actions.service.toggleService.listen(this._toggleService.bind(this)); |
@@ -341,6 +342,11 @@ export default class ServicesStore extends Store { | |||
341 | service.isAttached = true; | 342 | service.isAttached = true; |
342 | } | 343 | } |
343 | 344 | ||
345 | @action _detachService({ service }) { | ||
346 | service.webview = null; | ||
347 | service.isAttached = false; | ||
348 | } | ||
349 | |||
344 | @action _focusService({ serviceId }) { | 350 | @action _focusService({ serviceId }) { |
345 | const service = this.one(serviceId); | 351 | const service = this.one(serviceId); |
346 | 352 | ||