Handle failure to set fullscreen on iJOS

This commit is contained in:
Jaifroid 2023-03-05 12:49:57 +00:00
parent 3f06805889
commit 130b9a2075
2 changed files with 6 additions and 2 deletions

View File

@ -1467,7 +1467,9 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'cache', 'images
'<blockquote><code>' + err.toString() + '</code></blockquote>' +
"<p>If screen lock doesn't work, please change setting back to 'Normal' or try a different option.</p>");
} else {
uiUtil.systemAlert('There was an error setting the requested orientation: ' + err.toString());
uiUtil.systemAlert((!params.PWAInstalled && /iOS/.test(params.appType) ?
'<p>In Safari on iOS, consider adding this app to your homescreen (Share --&gt Add to Home) isntead.</p>' : '')
+ '<p>There was an error setting the requested screen state:</p><blockquote><code>' + err.toString() + '</code></blockquote>');
that.value = params.lockDisplayOrientation;
}
setDynamicIcons();

View File

@ -1022,7 +1022,7 @@ define(rqDef, function(util) {
return el ? true : false;
}).catch(function (err) {
console.log('Error enabling full-screen mode', err);
// throw err;
throw err;
});
}
@ -1061,6 +1061,8 @@ define(rqDef, function(util) {
return 'click';
}
}
}).catch(function (error) {
throw error;
});
} else {
// User wants to cancel full-screen mode and unlock the display orientation