SD-1695 - add flag for text selection in viewing mode#1891
SD-1695 - add flag for text selection in viewing mode#1891mattConnHarbour wants to merge 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 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".
| if (hasPermissionOverride) return false; | ||
| // Allow selection visuals when allowSelectionInViewMode is enabled | ||
| if (this.#options.allowSelectionInViewMode) return false; |
There was a problem hiding this comment.
Keep view locked for input bridge in selection-only mode
Returning false here when allowSelectionInViewMode is set makes the rest of the presentation layer treat viewing mode as editable. In particular, #setupInputBridge() uses !this.#isViewLocked() to decide whether to forward key/composition/beforeinput events to the hidden editor, so selection-only mode now forwards IME/composition input and keyboard shortcuts even though Editor.setEditable(false) still marks the document read-only. The Editable extension only blocks beforeinput/keydown, not composition events, so IME input can still mutate the document in viewing mode. Consider keeping #isViewLocked() true for the input bridge (or adding a separate “selection-only” check) so selection visuals are allowed without re-enabling input forwarding.
Useful? React with 👍 / 👎.
No description provided.