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

Add explicit crossFrame support for ReactFocusLock #73

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

cee-chen
Copy link
Contributor

closes #72

As of 2.3.0, react-focus-lock has supported a crossFrame prop which allows focus to escape to outside iframes when false.

react-focus-on currently does not expose passing that prop directly to react-focus-lock, but we'd really appreciate that support being added 🙏

Please let me know if I'm missing any docs or tests in this PR!

@cee-chen
Copy link
Contributor Author

@theKashey I opened this PR to hopefully save you a bit of time - please let me know if you see any issues, or if you have objections to support being added!

@theKashey
Copy link
Owner

Hey @cee-chen - thank you for stepping in and, well, making the change happen. Even if this is just a few lines my time is quite limited nowadays.

Change is approved, but can you help me create a better explanation for this prop. It's not about behavior of iframes, but behavior if "you" are inside iframe.

Something like

 enables or disables cross-frame focus management when using FocusLock within an iframe. `true` means that focus will be restricted within the iframe, while `false` allows focus to leave the iframe and move to elements outside of it. Default `true`

(generated by ChatGPT 🤷‍♂️)

@cee-chen
Copy link
Contributor Author

No problem at all, super happy to help! Let me tweak the docs copy here a bit based on your prompt!

src/types.ts Outdated Show resolved Hide resolved
@cee-chen
Copy link
Contributor Author

@theKashey let me know if that resolves your docs request or if you think the README addition needs tweaking as well!

@theKashey
Copy link
Owner

👍

@theKashey theKashey merged commit 59a98e9 into theKashey:master Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding support for react-focus-lock crossFrame prop
2 participants