Three problems prevented the document editor from being usable:
1. The contentEditable div inherited composer sizing (~22px tall) so
clicks in the document content area landed outside it and bubbled up
to the mx_RoomView div[tabIndex=-1], making the whole room view flash
blue instead of focusing the editor. Fixed by making the Editor stack
fill the full content area height in _DocumentView.pcss.
2. useSetCursorPosition was not called, so even when the editor received
focus there was no selection range and no visible cursor. Added the
hook call (same pattern as WysiwygComposer).
3. Any click outside the now-tall contentEditable div (e.g. in padding)
still fell through. Added an onClick handler on the content wrapper
that calls ref.current.focus() when the click target isn't the editor
itself, ensuring any click in the document area focuses the editor.
Bonus: suppress the browser default outline on .mx_RoomView:focus so
pressing a key no longer shows a blue box around the entire room view.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mkdir apps/web/scripts
mv scripts/{cleanup.sh,ci_package.sh,copy-res.ts,deploy.py,package.sh} apps/web/scripts
And a couple of gitignore tweaks
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>