diff --git a/assets/public/js/application.js b/assets/public/js/application.js index 794c7824..22f31f6d 100644 --- a/assets/public/js/application.js +++ b/assets/public/js/application.js @@ -511,10 +511,14 @@ document.addEventListener('listing', event => { document.getElementById('new').addEventListener('click', event => { let newdir = document.getElementById('newdir'); - newdir.classList.toggle('enabled'); + newdir.classList.add('enabled'); newdir.focus(); }); + document.getElementById('newdir').addEventListener('blur', event => { + document.getElementById('newdir').classList.remove('enabled'); + }); + document.getElementById('newdir').addEventListener('keydown', newDirEvent); // Drag and Drop