diff --git a/www/js/app.js b/www/js/app.js index 154381c6..93e6cceb 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -1467,7 +1467,9 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'cache', 'images '
' + err.toString() + '
' +
"If screen lock doesn't work, please change setting back to 'Normal' or try a different option.
"); } else { - uiUtil.systemAlert('There was an error setting the requested orientation: ' + err.toString()); + uiUtil.systemAlert((!params.PWAInstalled && /iOS/.test(params.appType) ? + 'In Safari on iOS, consider adding this app to your homescreen (Share --> Add to Home) isntead.
' : '') + + 'There was an error setting the requested screen state:
' + err.toString() + '
');
that.value = params.lockDisplayOrientation;
}
setDynamicIcons();
diff --git a/www/js/lib/uiUtil.js b/www/js/lib/uiUtil.js
index 009d9fec..b1a530b9 100644
--- a/www/js/lib/uiUtil.js
+++ b/www/js/lib/uiUtil.js
@@ -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