diff options
Diffstat (limited to 'src/components/services')
-rw-r--r-- | src/components/services/content/ServiceWebview.js | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js index 185d41175..2562c09ce 100644 --- a/src/components/services/content/ServiceWebview.js +++ b/src/components/services/content/ServiceWebview.js | |||
@@ -30,9 +30,14 @@ class ServiceWebview extends Component { | |||
30 | this.webview.view.addEventListener('console-message', e => { | 30 | this.webview.view.addEventListener('console-message', e => { |
31 | debug('Service logged a message:', e.message); | 31 | debug('Service logged a message:', e.message); |
32 | }); | 32 | }); |
33 | this.webview.view.addEventListener('did-navigate', () => { | ||
34 | document.title = `Ferdi - ${this.props.service.name} ${this.props.service.dialogTitle | ||
35 | ? ` - ${this.props.service.dialogTitle}` | ||
36 | : '' | ||
37 | } ${`- ${this.props.service._webview.getTitle()}`}`; | ||
38 | }) | ||
33 | } | 39 | } |
34 | }, | 40 | }) |
35 | ); | ||
36 | } | 41 | } |
37 | 42 | ||
38 | componentWillUnmount() { | 43 | componentWillUnmount() { |
@@ -47,6 +52,12 @@ class ServiceWebview extends Component { | |||
47 | if (this.props.service.isActive) { | 52 | if (this.props.service.isActive) { |
48 | webview.view.blur(); | 53 | webview.view.blur(); |
49 | webview.view.focus(); | 54 | webview.view.focus(); |
55 | window.setTimeout(() => { | ||
56 | document.title = `Ferdi - ${this.props.service.name} ${this.props.service.dialogTitle | ||
57 | ? ` - ${this.props.service.dialogTitle}` | ||
58 | : '' | ||
59 | } ${`- ${this.props.service._webview.getTitle()}`}`; | ||
60 | }, 100); | ||
50 | } else { | 61 | } else { |
51 | debug('Refocus not required - Not active service'); | 62 | debug('Refocus not required - Not active service'); |
52 | } | 63 | } |
@@ -92,9 +103,8 @@ class ServiceWebview extends Component { | |||
92 | } | 103 | } |
93 | allowpopups | 104 | allowpopups |
94 | nodeintegration | 105 | nodeintegration |
95 | webpreferences={`spellcheck=${ | 106 | webpreferences={`spellcheck=${isSpellcheckerEnabled ? 1 : 0 |
96 | isSpellcheckerEnabled ? 1 : 0 | 107 | }, contextIsolation=1, enableRemoteModule=1`} |
97 | }, contextIsolation=1, enableRemoteModule=1`} | ||
98 | /> | 108 | /> |
99 | ); | 109 | ); |
100 | } | 110 | } |