2 Commits

Author SHA1 Message Date
David Langley
a3875fc854 fix(docs): fix document editor focus and cursor issues
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>
2026-03-04 13:18:46 +00:00
Michael Telatynski
91a3cb03c1
mv element.io @types __mocks__/ debian docker module_system/ playwright res src test webapp Dockerfile .dockerignore .eslintignore .stylelintrc.cjs babel.config.cjs recorder-worklet-loader.cjs .modernizr.json components.json config.json config.sample.json package.json project.json tsconfig.json tsconfig.module_system.json jest.config.ts playwright.config.ts webpack.config.ts build_config.sample.yaml apps/web/
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>
2026-02-24 15:43:58 +00:00