From 9a10db837e5df23beb33f8b5583c69b7496f317e Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 21 Sep 2020 14:47:44 -0400 Subject: [PATCH] fix Notifications blocking items not visually under them from being interacted with (#915) * fix Notifications blocking items not visually under them from being interacted with Signed-off-by: Sebastian Malton --- src/renderer/components/dock/info-panel.tsx | 18 +++++++++--------- .../notifications/notifications.scss | 5 +++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/renderer/components/dock/info-panel.tsx b/src/renderer/components/dock/info-panel.tsx index 69e79ad8de..39d998d9d4 100644 --- a/src/renderer/components/dock/info-panel.tsx +++ b/src/renderer/components/dock/info-panel.tsx @@ -62,14 +62,13 @@ export class InfoPanel extends Component { this.error = ""; this.waiting = true; try { - this.result = await this.props.submit().finally(() => { - this.waiting = false; - }); + this.result = await this.props.submit() if (showNotifications) Notifications.ok(this.result); } catch (error) { this.error = error.toString(); if (showNotifications) Notifications.error(this.error); - throw error; + } finally { + this.waiting = false } } @@ -91,12 +90,13 @@ export class InfoPanel extends Component { <> {result && (
- {result} + + {result}
)} {errorInfo && (
- + {errorInfo}
)} @@ -114,9 +114,9 @@ export class InfoPanel extends Component { {controls}
- {waiting ? <> {submittingMessage} : this.renderInfo()} + {waiting ? <> {submittingMessage} : this.renderInfo()}
-