Clicking primary modal button shifts focus out of modal before modal closes #6579
Labels
4 - verified
Issues that have been released and confirmed resolved.
ArcGIS Field Apps
Issues logged by ArcGIS Field Apps team members.
bug
Bug reports for broken functionality. Issues should include a reproduction of the bug.
estimate - 2
Small fix or update, may require updates to tests.
impact - p2 - want for an upcoming milestone
User set priority impact status of p2 - want for an upcoming milestone
p - high
Issue should be addressed in the current milestone, impacts component or core functionality
Milestone
Actual Behavior
Whatever element had focus when opening a modal immediately regains focus when clicking the modal's primary button -- even if clicking the primary button does not immediately close the modal.
Expected Behavior
Whatever element had focus when opening a modal regains focus only after the modal is done closing.
Reproduction Sample
https://codepen.io/nwhittaker-esri/pen/dyqVxyy
Reproduction Steps
Reproduction Version
1.0.8
Relevant Info
No response
Regression?
No response
Priority impact
p2 - want for current milestone
Impact
The Field Maps web app has several modals that defer closing themselves until some asynchronous operation is finished (e.g. saving or duplicating a map). To prevent the user from triggering other operations, focus should remain trapped in the modal until it's closed.
In cases where the primary button does not immediately close the modal, this bug effectively allows keyboard navigation to prematurely escape the modal's focus trap.
Esri team
ArcGIS Field Apps
The text was updated successfully, but these errors were encountered: