mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-08-03 19:38:36 -04:00
Handle failure to set fullscreen on iJOS
This commit is contained in:
parent
3f06805889
commit
130b9a2075
@ -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 --> 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();
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user