ataverascrespo / RecordRack

Digital music collections and social platform
https://recordrack.ca
GNU General Public License v3.0
1 stars 1 forks source link

Dialogs auto focus on mobile #1

Closed ataverascrespo closed 1 year ago

ataverascrespo commented 1 year ago

Thanks to some user testing on mobile, that didn't appear during mobile emulation, it's come to my attention that the dialog screens auto focus when opened. It's really bad for UX as the user can't see what the dialog options are (i.e when adding music to their collection).

I think it would be best for UX if it did not auto focus.

ataverascrespo commented 1 year ago

This was a pretty simple fix. I'm using Shadcn/ui components, which are actually just Radix UI components styled with Tailwind. All I had to do was go to the Dialog component that was causing the error, and add the event.preventDefault() method on the components onOpenAutoFocus prop.