diff --git a/apps/remix-ide/src/app/ui/modal-dialog-custom.js b/apps/remix-ide/src/app/ui/modal-dialog-custom.js index ec4535ecc6..a0cf78bdbb 100644 --- a/apps/remix-ide/src/app/ui/modal-dialog-custom.js +++ b/apps/remix-ide/src/app/ui/modal-dialog-custom.js @@ -67,7 +67,25 @@ module.exports = { function prompt (title, text, hidden, inputValue, ok, cancel, focus) { if (!inputValue) inputValue = '' var type = hidden ? 'password' : 'text' - var input = yo`` + var input = yo` + + ` + const validateInput = (e) => { + if (e.target.value === '') { + document.getElementById('modal-footer-ok').classList.add('disabled') + } else { + document.getElementById('modal-footer-ok').classList.remove('disabled') + } + } + modal(title, yo`