There is a function that, when focusing, or clicking on an input field, calls a function that calls its own modal window. Everything works well. But, if I, for example, call a modal window (when focusing, clicking) on ​​the phone, then the keyboard for typing text flies to me, and behind it is that modal window .. which was called when clicking on the input field.

The question is, is it possible to block the keyboard call somehow? Whatever the focus, or click, it was not called (if we call a function to display a modal window)

  • It is possible to suppress focus if a click is made, "random" or single, perhaps the first click. When setting the focus, most browsers themselves show the keyboard. Or it is more difficult to indent the input window with a div, and when you need to put a normal Input. - nick_n_a
  • No, my logic is. There is a form, there is a select in it, it needs to be selected first. Ie if the user clicks on any text field, the select check function is activated, and then the function of displaying a modal window (if no select is selected). This all works on desktops without problems. The only thing that I don’t like is that on the mobile, when you click on the text field, a modal window flies out, and then the keyboard itself .. The problem is how to hide this keyboard, or in what way do the same action so that the keyboard does not appear? - user199432
  • Do the check, if the check fails - set the focus on the select back. Events onfocus onblur. The script is not forbidden to interrupt the focus. And if correctly, then let them enter further. - nick_n_a
  • The fact is that my function wraps all the elements in the form with text fields. Here's the code function Checksel() { if ($("#select_category").val() === "") { $('#myModal').modal(); } } $(".formpost").on("focusin", "input[type='text'],textarea", function() { Checksel(); }); function Checksel() { if ($("#select_category").val() === "") { $('#myModal').modal(); } } $(".formpost").on("focusin", "input[type='text'],textarea", function() { Checksel(); }); That is, I work with the form of the function, without touching or modifying the fields themselves in the form. Perhaps what I want to do from this code add the necessary functions? - user199432
  • Em found a solution, but I think how to apply it, before calling the modal window, we put readonly true inputs, then keyborder gets out, but now we need to understand what event to put it on. For by clicking out, and when I click the second time, everything is ok. Just confused in these tricks blours) - user199432

0