As described in #108, there are cases where autofocusing elements with tabindex -1 is desirable, but there are other use cases for tabindex -1 where that does not make sense. For example, a composite control with a roving tab index should place focus on the active element, not necessarily the first one.
As described in #108, there are cases where autofocusing elements with tabindex -1 is desirable, but there are other use cases for tabindex -1 where that does not make sense. For example, a composite control with a roving tab index should place focus on the active element, not necessarily the first one.
The issue can be reproduced here: https://codesandbox.io/s/react-focus-lock-tabindex-1-example-forked-371qh1. This sample works as intended if I downgrade to react-focus-lock@2.3.1.