const myModal = document.getElementById('myModal') const myInput = document.getElementById('myInput') myModal.addEventListener('shown.mdb.modal', () => { myInput.focus() })