Skip to content

Commit

Permalink
Backport PR #8343
Browse files Browse the repository at this point in the history
---------

**Commit 1:**
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.

* Original sha: 7dbb786
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-16T19:15:43Z

**Commit 2:**
Merge branch 'master' of https://github.com/elastic/kibana into bug/8063/no-safari-crash

* Original sha: 8578666
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T13:27:21Z

**Commit 3:**
Merge remote-tracking branch 'elastic/master' into bug/8063/no-safari-crash

* Original sha: f29b60a
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T20:23:07Z

**Commit 4:**
Clean up error message a tad

* Original sha: 36e298d
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T20:34:21Z
  • Loading branch information
elastic-jasper committed Sep 19, 2016
1 parent b6c390a commit 532756b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/ui/public/chrome/api/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 is restricting it. 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
Expand Down Expand Up @@ -50,6 +61,4 @@ module.exports = function (chrome, internals) {
chrome.setLastUrlFor = function (appId, url) {
internals.appUrlStore.setItem(`appLastUrl:${appId}`, url);
};


};

0 comments on commit 532756b

Please sign in to comment.