make sure the previous modal is hidden before open a new one

pull/1/head
yann300 5 years ago
parent 0fb2836316
commit 9a0f00f3b0
  1. 3
      src/app/tabs/runTab/settings.js
  2. 5
      src/app/ui/modaldialog.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`
<div>
<b>hash:</b><br>

@ -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) {

Loading…
Cancel
Save