Return focus on outside click does not respect "returnFocusOnDeactivate" value
See original GitHub issueAfter this issue: https://github.com/davidtheclark/focus-trap/issues/60, the click handler returns the focus to the focus trap if the new target is not clickable. However, this happens even if the returnFocusOnDeactivate
configuration option is passed in as false: https://github.com/davidtheclark/focus-trap/blob/master/index.js#L111-L114
Because I have set returnFocusOnDeactivate
to false, I was expecting that the focus trap would not return the focus. I feel like it should respect that configuration value and only return the focus when it is set to true and the new target is not clickable.
It was confusing for me so I am just wondering if this is intentional or if it is a bug. If it is intentional, I’m curious as to why, and if it is just a bug, I would be happy to open a PR to fix it.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top GitHub Comments
This is fixed in version 6.1.1 🎉
@all-contributors add @Slapbox for bug
@Slapbox 😆 It happens, I know! I’m still thankful that you ended-up on this issue because your inquiry led us to uncovering a bug that needs to be fixed, which will increase the quality and user satisfaction for this package.
It sounds like you’ve been able to sort things out, though, over on
focus-trap-react
, so I’m glad things are working for you now.