Help with hiding keyboard on tap

I have an application which takes a prompt and on a button click, it will generate an AI response. The problem is that when you click the button, the keyboard doesn't hide. If you tap anywhere else on the screen, the keyboard gets dismissed but not on the button. Is there a way I can fix this? Thanks

1
1 reply