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
Thanks to accessibly improvements in v2.0.0 / 16e979a, closing a modal popup resets focus to previously focused element. The element is pulled from document.activeElement when the modal is opening.
This is indeed the desired and expected behaviour most of the time.
But I'm hitting a use case where this is detrimental.
Given a long form (larger than the viewport) and a Submit button at the bottom the page, have said button open a modal (displaying validation issues). This modal features a link to the first field in the form (as an example) and clicking the link should focus/scroll the user to that field.
In this case behaviour after v2.0.0 is - user clicks the link, modal closes while page briefly scrolls to the top, reactjs-popup focuses Submit button, button is brought back into the viewport and user is left confused back at the bottom of the page (and will probably repeat the process).
It would be helpful if there was a way of disabling this behaviour. (this could potentially be lumped in with a solution for #171)
Thanks!
The text was updated successfully, but these errors were encountered:
Thanks to accessibly improvements in v2.0.0 / 16e979a, closing a modal popup resets focus to previously focused element. The element is pulled from document.activeElement when the modal is opening.
This is indeed the desired and expected behaviour most of the time.
But I'm hitting a use case where this is detrimental.
Given a long form (larger than the viewport) and a Submit button at the bottom the page, have said button open a modal (displaying validation issues). This modal features a link to the first field in the form (as an example) and clicking the link should focus/scroll the user to that field.
In this case behaviour after v2.0.0 is - user clicks the link, modal closes while page briefly scrolls to the top, reactjs-popup focuses Submit button, button is brought back into the viewport and user is left confused back at the bottom of the page (and will probably repeat the process).
It would be helpful if there was a way of disabling this behaviour. (this could potentially be lumped in with a solution for #171)
Thanks!
The text was updated successfully, but these errors were encountered: