microsoft / microsoft/microsoft-ui-xaml

TextBox selects all text when TextAlignment is Center or End if clicking/tapping on the left side

Open
#10,825 1 comment 0 reactions 1 assignee Claimed by @Hemantxk View on GitHub
area-TextBox bug
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

When an TextBox has TextAlignment set to Start, Center or End, clicking/tapping on the left side of the text area to focus the control selects all the text instead of placing the caret at the clicked position.

### Why is this important?

This behavior is inconsistent.

### Steps to reproduce the bug

Run the below code snippet
```



```

### Actual behavior

When clicking/tapping on the left side of the text area to focus the control selects all the text.

### Expected behavior

When clicking/tapping on the left side of the text area to focus the control placing the caret at the clicked position.

### Screenshots

https://github.com/user-attachments/assets/d9388341-de44-496a-9a4e-96bbecb266a5

### NuGet package version

None

### Windows version

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.