tailwindlabs / tailwindui-issues

Bug fixes and feature request tracking for Tailwind UI.
233 stars 4 forks source link

Clicking on `Input` icon does not focus input #1594

Closed reinink closed 3 months ago

reinink commented 3 months ago

Right now if you click on an Input icon the input is not focused:

Screen Shot 2024-06-05 at 4 10 31 PM

The fix is to add the [&>[data-slot=icon]]:pointer-events-none class to the InputGroup component.

This has been corrected in Catalyst, so you can either re-download Catalyst from the Tailwind UI website and replace the input.tsx file, or make this change yourself:

- '[&>[data-slot=icon]]:absolute [&>[data-slot=icon]]:top-3 [&>[data-slot=icon]]:z-10 [&>[data-slot=icon]]:size-5 sm:[&>[data-slot=icon]]:top-2.5 sm:[&>[data-slot=icon]]:size-4',
+ '[&>[data-slot=icon]]:pointer-events-none [&>[data-slot=icon]]:absolute [&>[data-slot=icon]]:top-3 [&>[data-slot=icon]]:z-10 [&>[data-slot=icon]]:size-5 sm:[&>[data-slot=icon]]:top-2.5 sm:[&>[data-slot=icon]]:size-4',