How does Wikipedia WAP get into the search page's automatic focus input box in ios?

The

project is built using vue-cli, and the requirement is to make a special search page. As soon as you enter the search page, the focus input box
has long heard that ios is not allowed to automatically focus on the input box, and previous solutions are circuitous, such as binding focus to a user click event
, but recently, when using Wikipedia, It is found that Wikipedia has achieved this function
clicking on the search button
at the top right of a single entry seems to jump to another page (the path has changed), and then the keyboard
implements its own idea is
simply turn the search page into a search component, render it and hide it with css (v-show) at the beginning, and then click on the original search page button to execute css display + focus, is too cumbersome. Is there a better way to get to know the dalao before you act?


I do the same thing. Hide the page first, but ask a question. If you want to focus on h after the end of the animation, how do you achieve it

Menu