pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/angular/angular/pull/67667

ets/global-68dd150ce6c8e711.css" /> docs: add doc to focusBoundControl feature by rblmdst · Pull Request #67667 · angular/angular · GitHub
Skip to content

docs: add doc to focusBoundControl feature#67667

Open
rblmdst wants to merge 4 commits intoangular:mainfrom
rblmdst:doc-focus-bound-control
Open

docs: add doc to focusBoundControl feature#67667
rblmdst wants to merge 4 commits intoangular:mainfrom
rblmdst:doc-focus-bound-control

Conversation

@rblmdst
Copy link
Contributor

@rblmdst rblmdst commented Mar 12, 2026

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?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@google-cla

This comment was marked as outdated.

@pullapprove pullapprove bot requested a review from devversion March 12, 2026 23:34
@angular-robot angular-robot bot added the area: docs Related to the documentation label Mar 12, 2026
@ngbot ngbot bot added this to the Backlog milestone Mar 12, 2026
@rblmdst rblmdst force-pushed the doc-focus-bound-control branch from 577edbf to 20f3aeb Compare March 12, 2026 23:47
@google-cla google-cla bot added cla: yes and removed cla: no labels Mar 12, 2026
@Component({/* ... */})
export class PasswordInput implements FormValueControl<string> {
readonly value = model<string>('');
readonly passwordCtrl = viewChild.required<ElementRef>('passwordCtrl');
Copy link
Contributor

Choose a reason for hiding this comment

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

You can specify the type in the generic ElementRef so we avoid having to do the casting later.

Suggested change
readonly passwordCtrl = viewChild.required<ElementRef>('passwordCtrl');
readonly passwordCtrl = viewChild.required<ElementRef<HTMLInputElement>>('passwordCtrl');

@JeanMeche JeanMeche requested review from bencodezen and removed request for devversion March 13, 2026 00:24

### Preventing scroll

If the target control is outside the viewport and you want to focus it without triggering a scroll, pass `{ preventScroll: true }`:
Copy link
Contributor

Choose a reason for hiding this comment

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

We could add a link in preventScroll or in focus to clarify what preventScroll does. Normally we reference MDN for this

https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#preventscroll

@JeanMeche
Copy link
Member

The topic covered seem to be a bit small the justify a dedicated guide. Also currently this file is orphan, it's isn't referenced in adev/src/app/routing/navigation-entries/index.ts and thus cannot by navigated to (nor is it present in the navigation page).

@rblmdst rblmdst requested a review from SkyZeroZx March 13, 2026 07:25

### Custom controls

By default, calling `focusBoundControl()` on a custom control has no effect. Because a custom control can contain multiple native inputs (for example, a date picker with separate day, month, and year fields), Angular cannot determine which element should receive focus or what action to perform.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
By default, calling `focusBoundControl()` on a custom control has no effect. Because a custom control can contain multiple native inputs (for example, a date picker with separate day, month, and year fields), Angular cannot determine which element should receive focus or what action to perform.
By default, calling `focusBoundControl()` on a custom control has no effect because a custom control can contain multiple native inputs. For example, a date picker can contain separate day, month, and year fields. As a result, Angular cannot determine which element should receive focus or what action to perform.


This guide covered validation and availability status handling, interaction tracking and field state propagation. Related guides explore other aspects of Signal Forms:


Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

This guide covered validation and availability status handling, interaction tracking and field state propagation. Related guides explore other aspects of Signal Forms:



Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

Copy link
Contributor

@bencodezen bencodezen left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @rblmdst! I made a suggestion to improve the writing flow for one paragraph.

Otherwise, if you could clean up the new line breaks (some have zero and some have two) to be consistent and address the other suggestions in the review, I think we should be go to ship this!

@rblmdst rblmdst requested a review from bencodezen March 13, 2026 15:53
@rblmdst rblmdst force-pushed the doc-focus-bound-control branch from 63c0df9 to 6f496f8 Compare March 13, 2026 15:57
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.

My comment here still stands: #67667 (comment)

@rblmdst
Copy link
Contributor Author

rblmdst commented Mar 16, 2026

My comment here still stands: #67667 (comment)

The content was already moved into the existing file adev/src/content/guide/forms/signals/field-state-management.md.

@JeanMeche JeanMeche added the target: patch This PR is targeted for the next patch release label Mar 16, 2026
@github-actions
Copy link

Deployed adev-preview for 6f496f8 to: https://ng-dev-previews-fw--pr-angular-angular-67667-adev-prev-zu9tfuko.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

@JeanMeche
Copy link
Member

The CI is reporting format issues, can you PTAL.

@JeanMeche JeanMeche added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Mar 17, 2026
@angular-robot angular-robot bot requested a review from JeanMeche March 18, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews adev: preview area: docs Related to the documentation cla: yes target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy