Skip to content

fix(TextBox): Initialize command states in constructor - #21859

Merged
MrJul merged 1 commit into
AvaloniaUI:mainfrom
zrt2399:fix_issue_21858
Jul 26, 2026
Merged

fix(TextBox): Initialize command states in constructor#21859
MrJul merged 1 commit into
AvaloniaUI:mainfrom
zrt2399:fix_issue_21858

Conversation

@zrt2399

@zrt2399 zrt2399 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

What does the pull request do?

Initializes TextBox clipboard command states during construction.

What is the current behavior?

Paste is disabled before an editable TextBox receives focus.

What is the updated/expected behavior with this PR?

Paste is enabled immediately for editable TextBox controls.

How was the solution implemented (if it's not obvious)?

Calls UpdateCommandStates() in the constructor and adds a regression test.

Checklist

Fixed issues

Fixes #21858

@MrJul MrJul added bug backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Jul 26, 2026

@MrJul MrJul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@MrJul
MrJul enabled auto-merge July 26, 2026 07:36
@MrJul
MrJul added this pull request to the merge queue Jul 26, 2026
@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.2.999-cibuild0067783-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Merged via the queue into AvaloniaUI:main with commit 386be0f Jul 26, 2026
11 checks passed
@MrJul MrJul added backported-12.1.x and removed backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Jul 29, 2026
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.

TextBox paste command is disabled until the control receives focus

3 participants