mirror of
https://github.com/penpot/penpot.git
synced 2026-07-31 09:31:44 -04:00
After `Modifier.removeRange` modified the block map, the `targetRange` from the drop event still referenced stale block keys from the pre-removal DOM state, causing `TypeError: Cannot read properties of undefined`. - Added a guarded `moveText` export in `frontend/packages/draft-js/index.js` that validates block keys exist before and after removal. Falls back gracefully when target range references stale keys. - Added a `handle-drop` callback in `frontend/src/app/main/ui/workspace/shapes/text/editor.cljs` that returns "handled" for internal drag operations, preventing Draft.js from calling its default (crash-prone) handler. AI-assisted-by: mimo-v2.5