mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
select all text in modal.prompt
This commit is contained in:
parent
fc49cb1e67
commit
ffd9e76e07
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue