-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Focus is not handled correctly with portals #3522
Comments
Also noticed same behavior occurs even without portals, when "Shift + Tab" is clicked: And now thinking of this form UX side, maybe it should never go into datepicker when using |
This is a significant issue, effectively making react-datepicker inaccessible in cases where the date picker is used with portals (a common scenario). Hoping this gets addressed quickly. |
actually it as accessible with arrows, and that would be preferred over tabbing into, because if user tabs over form, he don't want to get stuck into some date field that is not even what he want's to fill in.
|
Same Problem here!!! We have to use Portals to be sure the Datepicker is rendered correctly in our application since there are possibilities that somewhere in the App position: relative is set. See example: https://stackblitz.com/edit/react-ts-vfxgwp?file=App.tsx Problem seems to be this code in the ReactDatepicker index.js:
};` would it help if the if statement is extended with the portalId? |
Using portals, tab moves focus out of datepicker but leaves portal open. Without portal, user can still enter the picker with arrow keys. Tabbing through the datepicker should not land the user into a tab trap. closes Hacker0x01#3522
Describe the bug
When using datepicker with portals, focus does not go into datepicker from input
To Reproduce
Actual behavior
Focus goes to the next tabable object (this case textarea). If you have multiple date inputs by each other - multiple datepickers will open.
Expected behavior
Focus goes into datepicker like with example where portal is not used
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: