Skip to content

fix(controls): Correct cursor behavior in NumberBox and TextBox - #1771

Open
zrt2399 wants to merge 1 commit into
lepoco:mainfrom
zrt2399:main
Open

zrt2399 wants to merge 1 commit into
lepoco:mainfrom
zrt2399:main

Conversation

@zrt2399

@zrt2399 zrt2399 commented Oct 17, 2026 •

Copy link
Copy Markdown

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?

  • NumberBox sets the arrow cursor on the control through its default
    style. While the underlying TextBox has mouse capture during a click
    or text selection, the cursor is resolved from the control itself, so
    the IBeam cursor is replaced by the default arrow until the mouse
    button is released.
  • TextBox sets the IBeam cursor on the control, so the margins around
    the left/right icons and the clear button also show the IBeam cursor
    even though they are not part of the editable area.

What is the new behavior?

Fixes: #1770

  • NumberBox sets Cursor to IBeam/Arrow on the templated control
    based on IsEnabled, so the IBeam cursor is preserved while clicking
    and selecting text.
  • The arrow cursor is scoped to the left/right icon areas and the
    clear/spin button panel of NumberBox.
  • The TextBox icon presenters and clear button are wrapped in
    transparent grids using the arrow cursor, so icon and button margins no
    longer show the IBeam cursor.
  • Non-editable areas show the arrow cursor, and the disabled state still
    shows the arrow cursor everywhere.

Other information

XAML-only change, no public API changes.

@zrt2399
zrt2399 requested a review from pomianowski as a code owner October 17, 2026 13:34
@github-actions github-actions Bot added controls Changes to the appearance or logic of custom controls. styles Topic is related to styles PR Pull request release labels Oct 17, 2026

This branch has not been deployed

No deployments
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. PR Pull request release styles Topic is related to styles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NumberBox cursor changes to default arrow while the mouse button is pressed

1 participant