diff options
-rw-r--r-- | packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts b/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts index 5062da0..340c523 100644 --- a/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts +++ b/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts | |||
@@ -78,6 +78,13 @@ export default class ElectronServiceView implements ServiceView { | |||
78 | webContents.on( | 78 | webContents.on( |
79 | 'did-fail-load', | 79 | 'did-fail-load', |
80 | (_event, errorCode, errorDesc, url, isMainFrame) => { | 80 | (_event, errorCode, errorDesc, url, isMainFrame) => { |
81 | if (errorCode === -3) { | ||
82 | // Do not signal error on ABORTED, since that corresponds to an action requested by the user. | ||
83 | // Other events (`did-start-loading` or `did-stop-loading`) will cause service state changes | ||
84 | // that are appropriate for the user action. | ||
85 | log.debug('Loading', url, 'in service', this.id, 'aborted by user'); | ||
86 | return; | ||
87 | } | ||
81 | if (isMainFrame) { | 88 | if (isMainFrame) { |
82 | setLocation(url); | 89 | setLocation(url); |
83 | service.setFailed(errorCode, errorDesc); | 90 | service.setFailed(errorCode, errorDesc); |