Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

returnFocusOnDeactivate not working on mobile. #893

Closed
vasiliki-b opened this issue Feb 8, 2023 · 9 comments · Fixed by #899
Closed

returnFocusOnDeactivate not working on mobile. #893

vasiliki-b opened this issue Feb 8, 2023 · 9 comments · Fixed by #899
Labels

Comments

@vasiliki-b
Copy link

On mobile, when clickOutsideDeactivates and returnFocusOnDeactivate are set to true, clicking on an outside focusable element will focus that element instead of returning focus to the initial element.

@stefcameron
Copy link
Member

Does this also happen on desktop?

@stefcameron
Copy link
Member

(And thank you for reporting this!)

@vasiliki-b
Copy link
Author

It only happens on mobile (ie. through touch event).
(And no problem 🙂)

@stefcameron
Copy link
Member

@vasiliki-b Looking further into this, it turns out it is broken on desktop also. Not sure how you're seeing that it isn't.

In any case, thank you! 😄 I'll be fixing this shortly.

stefcameron added a commit that referenced this issue Feb 15, 2023
Fixes #893

If `clickOutsideDeactivates=true` along with the return focus option being
`true` and the outside click is on a focusable node, focus was returning to
that node instead of the node originally focused prior to activation.

Now the `returnFocusOnDeactivate` option does exactly what it says it will
do instead of the seemingly well-intentioned (based on the comment that was
removed) behavior.
stefcameron added a commit that referenced this issue Feb 15, 2023
Fixes #893

If `clickOutsideDeactivates=true` along with the return focus option being
`true` and the outside click is on a focusable node, focus was returning to
that node instead of the node originally focused prior to activation.

Now the `returnFocusOnDeactivate` option does exactly what it says it will
do instead of the seemingly well-intentioned (based on the comment that was
removed) behavior.
stefcameron added a commit that referenced this issue Feb 15, 2023
Fixes #893

If `clickOutsideDeactivates=true` along with the return focus option being
`true` and the outside click is on a focusable node, focus was returning to
that node instead of the node originally focused prior to activation.

Now the `returnFocusOnDeactivate` option does exactly what it says it will
do instead of the seemingly well-intentioned (based on the comment that was
removed) behavior.
@stefcameron
Copy link
Member

@all-contributors add @vasiliki-b for bug

@allcontributors
Copy link
Contributor

@stefcameron

I've put up a pull request to add @vasiliki-b! 🎉

@stefcameron
Copy link
Member

Fixed in v7.3.0 just now.

This was referenced Feb 15, 2023
@vasiliki-b
Copy link
Author

Thanks for fixing this 🥳

@stefcameron
Copy link
Member

@vasiliki-b You're welcome! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants