theKashey / react-focus-lock

It is a trap! A lock for a Focus. 🔓
MIT License
1.27k stars 67 forks source link

Why is `focusOptions` showing as deprecated? #224

Closed jmurzy closed 1 year ago

jmurzy commented 2 years ago

Being able to pass preventScroll: true via focus options is important in cases where auto focus is competing with a transition animation e.g. when sliding in a drawer with useTransition. Otherwise the potential page shift caused by focus breaks the animation.

https://github.com/theKashey/react-focus-lock/blob/514fc3267a1b8f5dd9f02fdcc89b655ddc39dbef/interfaces.d.ts#L20

theKashey commented 2 years ago

The idea is not to deprecate but to prevent accidental usage. Hense "Use this option only if you known what you are doing"

jmurzy commented 2 years ago

@deprecated infers it may be removed in a future release. How about we use @description instead?

stale[bot] commented 1 year ago

This issue has been marked as "stale" because there has been no activity for 2 months. If you have any new information or would like to continue the discussion, please feel free to do so. If this issue got buried among other tasks, maybe this message will reignite the conversation. Otherwise, this issue will be closed in 7 days. Thank you for your contributions so far.