Files
penpot/frontend
Andrey Antukh bb3ead7059 🐛 Fix crash on drag-and-drop of selected text in Draft.js editor
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
2026-07-30 12:46:10 +02:00
..
2026-06-22 14:35:10 +02:00
2026-07-27 10:45:59 +02:00
2026-07-01 14:45:41 +02:00
2026-06-30 16:15:30 +02:00
2026-07-27 10:45:59 +02:00
2026-07-27 10:45:59 +02:00