Handle on-screen keyboard for mobile devices in Save As

main
Isaiah Odhner 2021-02-01 14:11:08 -05:00
parent 2caabd8936
commit f7fea8b12d
1 changed files with 6 additions and 2 deletions

View File

@ -2461,9 +2461,13 @@ function choose_file_name_and_type(dialog_name, file_name, types, callback) {
$w.close();
});
$file_name.focus().select();
$w.center();
// For mobile devices with on-screen keyboards, move the window to the top
if (window.innerWidth < 500 || window.innerHeight < 700) {
$w.css({ top: 20 });
}
$file_name.focus().select();
}
// @TODO: establish a better pattern for this (platform-specific functions, with browser-generic fallbacks)