select all text in modal.prompt

This commit is contained in:
ed 2021-08-30 01:11:00 +02:00
parent fc49cb1e67
commit ffd9e76e07

View file

@ -782,7 +782,13 @@ var modal = (function () {
a = ebi('modal-ok');
a.onclick = ok;
(ebi('modali') || a).focus();
var inp = ebi('modali');
(inp || a).focus();
if (inp)
setTimeout(function () {
inp.setSelectionRange(0, inp.value.length, "forward");
}, 0);
document.addEventListener('focus', onfocus);
timer.add(onfocus);
};