etn-ccis / blui-react-native-workflows

Re-usable Brightlayer UI workflows for React Native applications
6 stars 6 forks source link

Pressing login does not dismiss keyboard and can obscure error modal #514

Open kelseybrennan12 opened 3 weeks ago

kelseybrennan12 commented 3 weeks ago

Describe the bug / expected behavior

If a user has not dismissed the keyboard when they tap the login button, the keyboard remains on the screen and can obscure the error modal.

I would expect that pressing the login button should dismiss the keyboard.

What are the steps to reproduce?

  1. Go to login screen on a real phone or a simulator with hardware keyboard disabled
  2. Type in an invalid username/password, leave the keyboard open
  3. Tap the "Log In" button

Screenshots / Screen recording

https://github.com/user-attachments/assets/48d37c5b-9de7-4070-bfcc-13033e69198b

Your environment information

shubham-eaton commented 2 weeks ago

We can try using react native keyboard object to dismiss the keyboard declaratively. Please refer the link https://reactnative.dev/docs/keyboard#dismiss

kelseybrennan12 commented 2 weeks ago

@shubham-eaton We tried adding onLogin={Keyboard.dismiss} to the BLUI LoginScreen component but it didn't work; the keyboard is still displayed.