humanmade / altis-cms

CMS Module for Altis
https://www.altis-dxp.com/resources/docs/core/
46 stars 5 forks source link

Local storage quota exceeded can crash editor #242

Open rmccue opened 3 years ago

rmccue commented 3 years ago

When opening Gutenberg in private browsing in Firefox, the local storage quota is much lower than usual. This can lead to the quota easily being exceeded.

In our editor settings override code, we override Gutenberg's settings. It's easily possible for this to hit and exceed the quota thanks to Pinpoint's use of local storage as well, and this throws a quota exception. The exception acts as an uncaught exception which then crashes Gutenberg into an unrecoverable state.

We need to catch these exceptions inside updateSettings.

rmccue commented 3 years ago

This may also be coming from the local storage preferences for A/B testing in the sidebar.