mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
js: When opening a dialogue box, try to focus it
This will make using menus from the keyboard more convenient.
This commit is contained in:
@ -251,6 +251,7 @@ function dialog_launch(ok_function, cancel_function) {
|
|||||||
|
|
||||||
document.body.appendChild(dlg_dimmer);
|
document.body.appendChild(dlg_dimmer);
|
||||||
document.body.appendChild(dlg_form);
|
document.body.appendChild(dlg_form);
|
||||||
|
dlg_form.querySelector("input,select,a").focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
function dialog_cleanup() {
|
function dialog_cleanup() {
|
||||||
|
Reference in New Issue
Block a user