mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 01:42:29 +03:00
59b304dfca
ref https://linear.app/tryghost/issue/ENG-661 - added a dirty check to ignore the `direction` field from the lexical object; this is set dynamically and shouldn't be serialized, see facebook/lexical/issues/4998 - fixed a bug where the modal wouldn't display on leaving the editor if the post had no revisions (e.g. import); this could result in content being saved over published content with no user action - added Sentry logging for the modal We would sometimes see the "Are you sure?" modal pop up when opening a post in the editor and attempting to navigate away immediately, without any changes to the post. This appears to be an issue with the serialized Lexical data, which would change after loading into the editor, resulting in the scratch and model's lexical values to differ, making Admin think the user changed the content. Ideally we'll see a fix upstream (or fix it ourselves). We may need to revisit this if we experience other such situations. It's awfully difficult to be able to set a flag saying 'the editor is done loading', so this seems to be the best path for the moment. Testing is difficult because we don't actually load the new Lexical editor into e2e/acceptance tests. I've added a unit test that can at least simulate the editor state changing on editor load. |
||
---|---|---|
.. | ||
design | ||
editor | ||
limits | ||
offers | ||
settings | ||
confirm-unsaved-changes.hbs | ||
custom-view-form.hbs | ||
custom-view-form.js | ||
delete-post.hbs | ||
delete-post.js | ||
email-preview.hbs | ||
email-preview.js | ||
new-custom-integration.hbs | ||
new-custom-integration.js | ||
restore-revision.hbs | ||
restore-revision.js | ||
search.hbs | ||
search.js | ||
whats-new.hbs | ||
whats-new.js |