Skip to content

fix(forms): preserve custom-control focus context in signal forms#67052

Merged
mattrbeck merged 1 commit intoangular:mainfrom
cexbrayat:fix/signal-forms-custom-focus-this
Feb 13, 2026
Merged

fix(forms): preserve custom-control focus context in signal forms#67052
mattrbeck merged 1 commit intoangular:mainfrom
cexbrayat:fix/signal-forms-custom-focus-this

Conversation

@cexbrayat
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Without this, custom focus methods that access instance members throw at runtime when focusBoundControl() is called.

Issue Number: #67051

What is the new behavior

Store custom control focus callbacks in a wrapper so method invocation keeps the original object context.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Fixes angular#67051

Store custom control focus callbacks in a wrapper so method invocation keeps the original object context. Without this, custom focus methods that access instance members throw at runtime when focusBoundControl() is called.
Copy link
Member

@JeanMeche JeanMeche left a comment

Choose a reason for hiding this comment

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

Thx for this !

@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Feb 13, 2026
@JeanMeche
Copy link
Member

(signals forms have diverged between patch & minor, so we'll have to target minor for this).

@mattrbeck mattrbeck merged commit 63d8005 into angular:main Feb 13, 2026
25 checks passed
@mattrbeck
Copy link
Member

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: forms target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants