diff --git a/src/app/tabs/runTab/settings.js b/src/app/tabs/runTab/settings.js index 8fd3c29116..2762657819 100644 --- a/src/app/tabs/runTab/settings.js +++ b/src/app/tabs/runTab/settings.js @@ -273,11 +273,12 @@ class SettingsUI { var account = $txOrigin.selectedOptions[0].value var promptCb = (passphrase) => { - modalDialogCustom.promptMulti(signMessageDialog, (message) => { + const modal = modalDialogCustom.promptMulti(signMessageDialog, (message) => { this.settings.signMessage(message, account, passphrase, (err, msgHash, signedData) => { if (err) { return addTooltip(err) } + modal.hide() modalDialogCustom.alert(yo`
hash:
diff --git a/src/app/ui/modaldialog.js b/src/app/ui/modaldialog.js index ef881b94d4..8128f588dc 100644 --- a/src/app/ui/modaldialog.js +++ b/src/app/ui/modaldialog.js @@ -77,7 +77,8 @@ module.exports = (title, content, ok, cancel, focusSelector, opts) => { } function hide () { - if (container) container.style.display = 'none' + if (!container) return + container.style.display = 'none' if (container.parentElement) container.parentElement.removeChild(container) container = null } @@ -119,7 +120,7 @@ module.exports = (title, content, ok, cancel, focusSelector, opts) => { } }) } - return { container, okListener, cancelListener } + return { container, okListener, cancelListener, hide } } function html (opts) {