Commit 9a0f00f3 authored by yann300's avatar yann300

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

parent 0fb28363
...@@ -273,11 +273,12 @@ class SettingsUI { ...@@ -273,11 +273,12 @@ class SettingsUI {
var account = $txOrigin.selectedOptions[0].value var account = $txOrigin.selectedOptions[0].value
var promptCb = (passphrase) => { var promptCb = (passphrase) => {
modalDialogCustom.promptMulti(signMessageDialog, (message) => { const modal = modalDialogCustom.promptMulti(signMessageDialog, (message) => {
this.settings.signMessage(message, account, passphrase, (err, msgHash, signedData) => { this.settings.signMessage(message, account, passphrase, (err, msgHash, signedData) => {
if (err) { if (err) {
return addTooltip(err) return addTooltip(err)
} }
modal.hide()
modalDialogCustom.alert(yo` modalDialogCustom.alert(yo`
<div> <div>
<b>hash:</b><br> <b>hash:</b><br>
......
...@@ -77,7 +77,8 @@ module.exports = (title, content, ok, cancel, focusSelector, opts) => { ...@@ -77,7 +77,8 @@ module.exports = (title, content, ok, cancel, focusSelector, opts) => {
} }
function hide () { function hide () {
if (container) container.style.display = 'none' if (!container) return
container.style.display = 'none'
if (container.parentElement) container.parentElement.removeChild(container) if (container.parentElement) container.parentElement.removeChild(container)
container = null container = null
} }
...@@ -119,7 +120,7 @@ module.exports = (title, content, ok, cancel, focusSelector, opts) => { ...@@ -119,7 +120,7 @@ module.exports = (title, content, ok, cancel, focusSelector, opts) => {
} }
}) })
} }
return { container, okListener, cancelListener } return { container, okListener, cancelListener, hide }
} }
function html (opts) { function html (opts) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment