0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00
Independent technology for modern publishing, memberships, subscriptions and newsletters.
Find a file
Kevin Ansfield d1e1c8b11c Fixed "Enter" in callout card throwing an error if text has been changed
no issue

- we had some code in `<KoenigEditor>` that was automatically saving a card when exiting edit mode based on some flawed logic, this meant we were making multiple editor updates simultaneously resulting in usage+change of the upstream `post` model within the same render loop (add paragraph code deselected the card, starts adding new paragraph, the deselection triggered the exit-edit mode which then caused a simultaneous post update)
  - passed card env through to `<KoenigEditor>` so that it can compare current payload state against the "saved" payload state to determine if it should save when leaving edit mode
- renamed `_textReplacementEditor` to `_calloutTextEditor` to better match it's usage
- removed unnecessary `onNewline` handling, it wasn't being called because we overrode `ENTER` key
2021-11-18 18:57:21 +00:00
ghost/admin Fixed "Enter" in callout card throwing an error if text has been changed 2021-11-18 18:57:21 +00:00