81
Views
4
Comments
 Close Iphone Ipad keyboard automatically when closing modal
Question


Hello community, could you help me with this problem ...


I need that when closing a modal, the keyboard is automatically closed ..


I am attentive to your help 

: / 


regards!



UserImage.jpg
Felipe Fernández

I have the same problem, i try whit javascript in the input using the attribut blur() , but not work.
Any idea?

Regards Luis!

UserImage.jpg
Felipe Fernández

I solved.
Create an entry field in disabled, then with CSS properties to leave it not visible and absolute so that it does not bother the screen.When I close the modal with javascript I do a .focus() and then a .blur() to that input and with that it is solved.

Sorry for my english.

2026-01-19 13-02-40
Matheus Fonseca

Hello, Luis! I apologize for only giving a possible solution now. I had the same problem and when searching the forum, I found some solutions that I didn't find very practical... I ended up developing my own and I found it very simple:

To remove the focus from the input, I created a local variable and assigned it to the input's Enable boolean, then I just played it in my logic, setting the moment I want it to lose focus, setting enabled to false and then making it true. This worked for me and I hope it works for you.

See ya!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.