fix: `initialFocus` breaks date-picker on firefox and ios-chrome
initialFocus leads to the popover not opening on firefox and ios chrome.
i couldnt find any difference in accessibility with this change.
closes https://github.com/shadcn-ui/ui/issues/910
@kitsunekyo is attempting to deploy a commit to the shadcn-pro Team on Vercel.
A member of the Team first needs to authorize it.
@kitsunekyo Can you help me reproduce this? I just tested in Firefox but was not sure what I should be looking for. Thank you.
okay, it took me a while to actually reproduce this. but the culprit seems to be serverActions.
https://github.com/kitsunekyo/dialog-repro
with serverActions enabled, the only way i can get the date-picker to work is to delete initialFocus
This work for me , I used date-picker on Sheet and not work os ios.
@shadcn this is still broken for me atm
Tested on ios/macos safari and chrome, initialFocus will make popover not showing, but the demo on shadcn page does work fine. We are using next.js 14 and not turning on sever action, actually we use client and export mode. So not sure what is the root cause since there is no error in console. So far have to move this attribute, btw, not sure what this one is doing because this is nothing change with/without this.