Skip to content

fix: PasswordBox issues with pasting/copying#1547

Merged
pomianowski merged 3 commits intolepoco:mainfrom
Nuklon:patch-37
Nov 7, 2025
Merged

fix: PasswordBox issues with pasting/copying#1547
pomianowski merged 3 commits intolepoco:mainfrom
Nuklon:patch-37

Conversation

@Nuklon
Copy link
Collaborator

@Nuklon Nuklon commented Oct 17, 2025

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

There are many issues inside PasswordBox:

  1. If you paste a text that's longer than the current text, only the characters at the end are changed. For example. If you have "test" and paste "hello world", it'll become "testo world".
  2. If you paste in multiple characters, often only one gets inserted due to breaking early.
  3. Selecting multiple characters, and then paste a shorter one, you'll get a mishmash of characters.
  4. Exception thrown when binding to a null Password.

This PR addresses all issues by simply using the TextChanges passed in with the event.

@Nuklon Nuklon requested a review from pomianowski as a code owner October 17, 2025 10:14
@github-actions github-actions bot added controls Changes to the appearance or logic of custom controls. PR Pull request dotnet release labels Oct 17, 2025
@Nuklon
Copy link
Collaborator Author

Nuklon commented Oct 17, 2025

@pomianowski If you have some time, there are a lot of PRs to review/merge.

apachezy added a commit to apachezy/wpfui that referenced this pull request Nov 6, 2025
@pomianowski pomianowski changed the title Fix PasswordBox fix: PasswordBox issues with pasting/copying Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controls Changes to the appearance or logic of custom controls. dotnet PR Pull request release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants