mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Bug #8063 Safari crash in private browsing mode
Catch the crash and display a more useful error message to the user about a work around.
This commit is contained in:
parent
84a504ecf0
commit
7dbb786dcd
1 changed files with 11 additions and 2 deletions
|
@ -8,6 +8,17 @@ module.exports = function (chrome, internals) {
|
|||
}
|
||||
|
||||
internals.appUrlStore = internals.appUrlStore || window.sessionStorage;
|
||||
try {
|
||||
const verifySessionStorage = 'verify sessionStorage';
|
||||
internals.appUrlStore.setItem(verifySessionStorage, 1);
|
||||
internals.appUrlStore.removeItem(verifySessionStorage);
|
||||
} catch (error) {
|
||||
throw new Error(
|
||||
'Kibana requires access to sessionStorage, and it looks like ' +
|
||||
'your browser isn\'t providing access to sessionStorage. If you\'re ' +
|
||||
'using Safari with private browsing enabled, you can solve this ' +
|
||||
'problem by disabling private browsing, or by using another browser.');
|
||||
}
|
||||
|
||||
/**
|
||||
* ui/chrome apps API
|
||||
|
@ -50,6 +61,4 @@ module.exports = function (chrome, internals) {
|
|||
chrome.setLastUrlFor = function (appId, url) {
|
||||
internals.appUrlStore.setItem(`appLastUrl:${appId}`, url);
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue