In tablet mode, while filtering datatable columns, the keyboard disappears on every keypress.

In tablet mode, while filtering datatable columns, the keyboard disappears on every keypress.

msm_baltazarmsm_baltazar Posts: 59Questions: 22Answers: 0

Hello friends,
I used datatable for an application running in the browser on the tablet. I added search boxes to each column for column-by-column filtering. When I open the application from Ipad Pro and when I want to filter a column, when I touch the textbox, the keyboard pops up and it disappears, allowing me to press only 1 character. If I want to search about 4.5 characters, I have to touch the textfield 4.5 times and wait for the keyboard screen to come up. I also have the same problem while deleting. In the search box, I have to touch the text field to delete the search criteria I have searched before. In other words, the focus in the Textbox disappears with each key press. I created a test case for this problem. But you can only see this problem on the tablet. How can I solve this problem?

Test case : http://live.datatables.net/zidazoha/20/edit

Answers

  • kthorngrenkthorngren Posts: 21,173Questions: 26Answers: 4,923
    edited December 2020

    This isn't a Datatables issue as you are creating the inputs. Maybe you can find something on Stack Overflow with suggestions of how to keep focus.

    You might look at trying to use focus() or click(), as shown in this SO thread , after the search in the input's change event.

    Kevin

  • msm_baltazarmsm_baltazar Posts: 59Questions: 22Answers: 0

    I understand, I will look at the links you sent. But I do not experience this focus problem in the general search area on the upper right of the datatable. I thought it was a problem with datatable.

  • kthorngrenkthorngren Posts: 21,173Questions: 26Answers: 4,923

    My guess is its due to the draw() call in your input event handler. So you need to put the focus back on the input. Just a guess, haven't tried it.

    Kevin

This discussion has been closed.