Repository navigation
Description
Description
In v0.96.0, clicking a page in a space's Trash to preview it crashes the preview with:
Uncaught TypeError: can't access property "dispatchTransaction", t is undefined
createView / mount (api-client-*.js)
createEditor / getInitialEditor (mention-view-*.js)
...
onClick (space-trash-*.js)
The preview never renders. Restoring from the trash still works.
Steps to reproduce
- Self-hosted Docmost v0.96.0 (Docker image
docmost/docmost:0.96.0), community edition. - Move a page to the trash.
- Open the trash and click the page to preview it.
Cause
apps/client/src/features/editor/readonly-page-editor.tsx passes editorProps only for public views and explicitly undefined otherwise:
The explicit undefined overrides Tiptap's default editorProps: {}. Editor.createView() in @tiptap/core 3.31.3 then reads editorProps.dispatchTransaction and throws:
Public shares and public spaces are unaffected because isPublicView is true there. The non-public callers are the trash preview (trash-page-content-modal.tsx) and the EE PDF render page (pdf-render-page.tsx).
This was introduced in #2420 (lightbox), which added editorProps={… : undefined}; v0.95.0 passes no editorProps and is not affected.
Suggested fix
--- a/apps/client/src/features/editor/readonly-page-editor.tsx
+++ b/apps/client/src/features/editor/readonly-page-editor.tsx
@@ -143,7 +143,7 @@
setLightboxRequest(request);
return true;
},
}
- : undefined
+ : {}
}
onCreate={({ editor }) => {
Activity
[-]Clicking page in trash crashes preview[/-][+][BUG] Clicking page in trash crashes preview[/+]Philipinho commentedon Oct 9, 2026
Thanks for flagging. Will get this fixed.