Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Provide form.$focused boolean state #12447

Open
jaythomas opened this issue Jul 28, 2015 · 5 comments
Open

Provide form.$focused boolean state #12447

jaythomas opened this issue Jul 28, 2015 · 5 comments

Comments

@jaythomas
Copy link

It would be nice to be able to tell from the form whether a field is blurred or focused.

Use case: I want to access and process a user's information as they type it, but I don't want to display an error to the user unless form.someValue.$blurred is true. Asking the model options to updateOn: 'blur' would prevent me from accessing someValue until the field is blurred.

I am aware this can be accomplished from a custom directive, but am hoping this is a useful enough feature for others to garner their interest.

@jaythomas
Copy link
Author

I didn't see this issue was closed without being reopened -- #903

@Narretz
Copy link
Contributor

Narretz commented Aug 3, 2015

"Blurred" is already available as $touched. As for focus, I think we didn't want to burden the core with this, as it's not difficult to implement via custom directive and it's not super frequently needed feature.

@Narretz Narretz changed the title Provide form.$blurred and form.$focused boolean states Provide form.$focused boolean state Aug 3, 2015
@Narretz Narretz modified the milestones: Purgatory, Ice Box Aug 3, 2015
@inoa-fpinheiro
Copy link

+1

@tinglu
Copy link

tinglu commented Oct 21, 2015

+1 $focus($focused) is an useful flag

@askucher
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants