In Regular React How To Dismiss Mobile Keyboards On Submit Or 'enter' Key?
I am trying to find this answer, but all the other questions I have found are React Native. `handleEnter(e){ if(e.key == 'Enter'){ //REMOVE KEYBOARD } }` Also my
Solution 1:
e.target
is the focused input
or textarea
where the user is writhing. When he click on Enter
the focused input
became unfocused and so the keyboard disappear
`handleEnter(e){
if(e.key == 'Enter'){
e.target.blur();
}
}`
Post a Comment for "In Regular React How To Dismiss Mobile Keyboards On Submit Or 'enter' Key?"