mirror of
https://github.com/penpot/penpot.git
synced 2026-10-30 06:20:32 +00:00
Skip the PENPOT_SELECTION stamp when the selection is collapsed or points at blocks that no longer exist: blurring the editor rebuilds the EditorState with fresh block keys while a delayed on-change still carries the old keys, which crashed Draft.js reading getCharacterList of undefined and killed the workspace. Harden the sibling helpers (removeBlurSelectionEntity, cursorToEnd, select-all/end builders) the same way and add a vitest suite to the draft-js package covering stale, empty, and collapsed selections. Closes #11667 AI-assisted-by: muse-spark-1.3-contributor
26 lines
699 B
JSON
26 lines
699 B
JSON
{
|
|
"name": "@penpot/draft-js",
|
|
"version": "1.0.0",
|
|
"description": "Penpot Draft-JS Wrapper",
|
|
"main": "index.js",
|
|
"type": "module",
|
|
"packageManager": "pnpm@12.14.0+sha512.c18ba6d87993d3d164cb5e8948f32b2c06ee854487e06cd8d86781342fb3e5bb4634367034711e86802baa9c37bea906ce1929ad08d70884c97d801df13389a6",
|
|
"author": "Andrey Antukh",
|
|
"license": "MPL-2.0",
|
|
"dependencies": {
|
|
"draft-js": "penpot/draft-js.git#c58ebd9429a6359d72a88cff87e078aaf6fe285d"
|
|
},
|
|
"scripts": {
|
|
"test": "vitest run"
|
|
},
|
|
"peerDependencies": {
|
|
"react": ">=0.17.0",
|
|
"react-dom": ">=0.17.0"
|
|
},
|
|
"devDependencies": {
|
|
"esbuild": "^0.28.1",
|
|
"jsdom": "^30.0.1",
|
|
"vitest": "^4.1.10"
|
|
}
|
|
}
|