mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 16:42:17 +03:00
refs https://github.com/TryGhost/Ghost/issues/9623 - fixes `Maximum call stack size exceeded` error when you paste content containing `<code>` elements and then place the cursor at the end of one of those elements - this was occurring because the code in `inputModeDidChange()` was triggering another `inputModeDidChange() call - use the private mobiledoc-kit methods to toggle editor state because we don't want to trigger `inputModeDidChange()` callbacks - look at the editor state directly rather than going by what we _think_ the editor state should be based on the markers around the cursor - fixes another subtle issue where after pasting if you placed the cursor at the end of the code format and started typing it would still be formatted as code - mobiledoc-kit has an odd behaviour where duplicate edit states for the markup are present so we have to loop over them rather than relying on a single `toggleMarkupState()` call |
||
---|---|---|
.. | ||
koenig-card-code.js | ||
koenig-card-hr.js | ||
koenig-card-html.js | ||
koenig-card-image.js | ||
koenig-card-markdown.js | ||
koenig-card.js | ||
koenig-editor.js | ||
koenig-link-input.js | ||
koenig-link-toolbar.js | ||
koenig-plus-menu.js | ||
koenig-slash-menu.js | ||
koenig-toolbar.js |