startFocusManagement
Handles focus transfer from the SDK UI back to your application.
Overview
The startFocusManagement
method is called when the user navigates away from the SDK UI and focus should return to your application. Your implementation should handle setting focus to the appropriate element in your UI to ensure a seamless navigation experience. It's important to note that it releases the focus management from the SDK, allowing your application to take control of focus transitions.
Method Signature
startFocusManagement(): Promise<void>
Parameters
This method does not take any parameters.
Return Value
A Promise that resolves when focus has been successfully set in your application.
Implementation Requirements
Your implementation of this method should:
- Identify the appropriate UI element in your application to receive focus
- Set focus to that element using standard DOM methods (e.g.,
element.focus()
) - Return a resolved promise
Notes
- Consider saving the last focused element in your application before focus is transferred to the SDK, so you can restore it when focus returns.
- The focus transition should be smooth and predictable for the user.