Skip to content

SD-1695 - add flag for text selection in viewing mode#1891

Merged
caio-pizzol merged 16 commits intomainfrom
SD-1695
Mar 14, 2026
Merged

SD-1695 - add flag for text selection in viewing mode#1891
caio-pizzol merged 16 commits intomainfrom
SD-1695

Conversation

@mattConnHarbour
Copy link
Copy Markdown
Contributor

No description provided.

@linear
Copy link
Copy Markdown

linear Bot commented Jan 30, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b3b19fc0cd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/super-editor/src/core/presentation-editor/PresentationEditor.ts Outdated
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one @mattConnHarbour!

wonder how we didn't catch this previously
ps. don't forget about allowing keyboard interactions as well

Comment thread packages/super-editor/src/core/extensions/editable.js
Comment thread packages/super-editor/src/core/presentation-editor/PresentationEditor.ts Outdated
Comment thread packages/super-editor/src/core/extensions/editable.js
harbournick and others added 13 commits March 13, 2026 10:49
…on-only view mode (SD-1695)

- Allow navigation keys (arrows, Home/End, PageUp/PageDown), Cmd+A, and
  Shift+Arrow in addition to Cmd+C for keyboard accessibility
- Block composition events (compositionstart/update/end) to prevent IME
  input from mutating the document when view.editable is true due to
  allowSelectionInViewMode
- Add unit tests for keyboard allowlist and composition blocking
…editable extension (SD-1695)

- Fix missed allowSelectionInViewMode guard in RAF callback that was
  clearing selection on the next animation frame, defeating the feature
- Extract isFullyBlocked() and blockWhenNotEditable() helpers to
  deduplicate guard logic in editable.js
- Hoist navigation keys to module-level NAVIGATION_KEYS Set
- Collapse composition event tests into it.each
…1695)

- Add allowSelectionInViewMode and documentMode params to behavior
  test harness and fixture config
- Add behavior tests verifying: mouse click + keyboard navigation,
  Shift+Arrow selection extending, Select All, typing/paste/delete
  blocked, and selection cleared without the flag
…tations (SD-1695)

Keyboard selection extending (Shift+Arrow, Cmd+A) doesn't work in
PresentationEditor mode because view.editable is false and PM's
editHandlers.keydown doesn't run. Replace those tests with
triple-click selection (mouse-based) which works correctly.
…on-only view mode (SD-1695)

- Allow navigation keys (arrows, Home/End, PageUp/PageDown), Cmd+A, and
  Shift+Arrow in addition to Cmd+C for keyboard accessibility
- Block composition events (compositionstart/update/end) to prevent IME
  input from mutating the document when view.editable is true due to
  allowSelectionInViewMode
- Add unit tests for keyboard allowlist and composition blocking
…editable extension (SD-1695)

- Fix missed allowSelectionInViewMode guard in RAF callback that was
  clearing selection on the next animation frame, defeating the feature
- Extract isFullyBlocked() and blockWhenNotEditable() helpers to
  deduplicate guard logic in editable.js
- Hoist navigation keys to module-level NAVIGATION_KEYS Set
- Collapse composition event tests into it.each
…1695)

- Add allowSelectionInViewMode and documentMode params to behavior
  test harness and fixture config
- Add behavior tests verifying: mouse click + keyboard navigation,
  Shift+Arrow selection extending, Select All, typing/paste/delete
  blocked, and selection cleared without the flag
…tations (SD-1695)

Keyboard selection extending (Shift+Arrow, Cmd+A) doesn't work in
PresentationEditor mode because view.editable is false and PM's
editHandlers.keydown doesn't run. Replace those tests with
triple-click selection (mouse-based) which works correctly.
…' of github.com:Harbour-Enterprises/SuperDoc into caio/sd-1695-add-text-selection-support-in-viewing-mode
@caio-pizzol caio-pizzol merged commit 382ffa6 into main Mar 14, 2026
7 checks passed
@caio-pizzol caio-pizzol deleted the SD-1695 branch March 14, 2026 21:21
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 14, 2026

🎉 This PR is included in superdoc v1.18.0-next.58

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 14, 2026

🎉 This PR is included in superdoc-cli v0.2.0-next.133

The release is available on GitHub release

@harbournick
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in superdoc v1.19.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 20, 2026

🎉 This PR is included in superdoc-cli v0.3.0

The release is available on GitHub release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants