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 may have missed it, but it doesn't seem like there is a way currently to use the invalidate API and keep focus on the currently active element. We oftentimes use the invalidate API in order to poll our data for updates, and as this is essentially a background task it shouldn't really interrupt the user's current action (e.g. typing in a form field). Currently we're working around this by refocusing the element after all invalidate promises have resolved, but this feels like a bit of a hack.
Describe the proposed solution
Allow options to be passed to invalidate as the second parameter, with keepfocus being the first supported option:
invalidate('api.example.com',{keepfocus: true});
Alternatives considered
No response
Importance
would make my life easier
Additional Information
Multiple invalidates can run for a single transition, so it's kind of hard to know what to do if the options for each invalidate conflict.
The text was updated successfully, but these errors were encountered:
Does this only happen recently? I think #2819 might've accidentally caused this.
@benmccann Come to think of it, maybe the initial way was intended after all, I don't think we would want to handle hash, scroll, keepfocus for invalidate. Should we revert that and document it?
Describe the problem
I may have missed it, but it doesn't seem like there is a way currently to use the
invalidate
API and keep focus on the currently active element. We oftentimes use theinvalidate
API in order to poll our data for updates, and as this is essentially a background task it shouldn't really interrupt the user's current action (e.g. typing in a form field). Currently we're working around this by refocusing the element after allinvalidate
promises have resolved, but this feels like a bit of a hack.Describe the proposed solution
Allow options to be passed to
invalidate
as the second parameter, withkeepfocus
being the first supported option:Alternatives considered
No response
Importance
would make my life easier
Additional Information
Multiple
invalidate
s can run for a single transition, so it's kind of hard to know what to do if the options for each invalidate conflict.The text was updated successfully, but these errors were encountered: