add: hide keyboard on mobile device on form submission

This commit is contained in:
sushant dhimal 2023-03-09 22:16:47 +05:45
parent e58fe2d745
commit 902515a23a
1 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,9 @@ function App() {
setReponseFromAPI(true);
setChatLog([...chatLog, { chatPrompt: inputPrompt }]);
callAPI();
// hide the keyboard in mobile devices
e.target.querySelector("input").blur();
}
async function callAPI() {