When attempting to restore a backup from a file under Settings >> Backup and Restore, the "Restore File..." button fails silently without showing the dialog and throws an error: dialogConfirmRestore.showModal' is undefined. This is happening for me in Safari 15.3 on MacOS, however it is working in Chrome.


Under further inspection, it appears the confirmRestore() function doesn't fall back to using a polyfill and I can fix this in the dev console by using registerDialog().
Here's the working example:
function confirmRestore(callback) {
const dialogConfirmRestore = document.querySelector('#dialogConfirmRestore');
// added polyfill fallback
if (!dialogConfirmRestore.showModal) {
dialogPolyfill.registerDialog(dialogConfirmRestore);
}
dialogConfirmRestore.showModal();
$('#btnCancelRestore').focus();
$('#btnDoRestore').off("click");
$('#btnDoRestore').on("click", function() {
closeDialogConfirmRestore();
callback();
});
}