mirror of
https://github.com/penpot/penpot.git
synced 2026-11-12 13:00:37 +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.18.0+sha512.9d7882d5dc82147ecfc4e062aa34834e0ad0296710a1837a1115ae012127d36b7109e321ac1598a1dd0a65597681b1e99917e12ed0d749eae91187943363beb3",
|
|
"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"
|
|
}
|
|
}
|