You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm firing off the below effect to reset the form and set focus, it works for the first submit, but all subsequent the focus action dispatches but the control is not focused.
Have you added [ngrxEnableFocusTracking]="true" to the control in HTML? Only if this is set will the form control directive properly track focus changes. Without this what will happen is exactly what you observe. You focus the element once, but in the state it never becomes unfocused. And therefore it will not focus the element the second time since it thinks it is still focused.
PS: The reason the focus tracking is opt-in is that otherwise there would be quite the spam of actions when controls become focused and unfocused all the time.
I agree with the opt in, if i'm understanding correctly. Majority of forms you only have one or two focus events you want to track usually on reset to go back to the beginning and such. That also fixed the issue, thank you.
I'm firing off the below effect to reset the form and set focus, it works for the first submit, but all subsequent the focus action dispatches but the control is not focused.
The text was updated successfully, but these errors were encountered: