Skip to content

Conversation

@yavanosta
Copy link
Contributor

Similar to #259042 fixing selectionDirection for TextAreaEditContext.

Fixes #273146

Copilot AI review requested due to automatic review settings October 24, 2025 17:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes backward selection handling in the TextArea edit context when EditContext is off. The issue was that the selection direction wasn't being properly accounted for when converting from editor selection state to textarea state.

Key Changes:

  • Added SelectionDirection parameter to fromScreenReaderContentState method
  • Swapped selectionStart and selectionEnd for RTL (right-to-left) selections

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
textAreaEditContextState.ts Modified fromScreenReaderContentState to accept and handle selection direction, swapping start/end for RTL selections
textAreaEditContext.ts Updated call site to pass selection direction to fromScreenReaderContentState

@yavanosta yavanosta force-pushed the TextAreaState-backward-selection branch from 7e4c68c to 6e58b1f Compare November 25, 2025 14:37
@yavanosta
Copy link
Contributor Author

Hi @aiday-mar is there anything I can do in this PR?

@aiday-mar aiday-mar self-requested a review December 2, 2025 14:37
@aiday-mar
Copy link
Contributor

Hi thanks for the PR. It's good, we will get it merged.

@aiday-mar aiday-mar enabled auto-merge (squash) December 16, 2025 11:27
@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Dec 16, 2025
@aiday-mar aiday-mar merged commit 48304ac into microsoft:main Dec 16, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to type when text is selected backwards

3 participants