Taro applet input component focus attribute failure solution

Taro applet development will encounter a problem when using the Input component. The Input component is set to automatically focus, but it does not take effect on iPhone X and some android models. This is a bug of the official component, as of Taro v3.2.7 version At present, this problem has not been solved, and the usage methods that cannot take effect are as follows:

<Input type='text' placeholder='将会获取焦点' focus={true}/>

Solution: Modify it to the native component input of the WeChat applet

<input type='text' placeholder='将会获取焦点' focus={true}/>

If it works, remember to like it three times, thank you~

Guess you like

Origin blog.csdn.net/qq_33539839/article/details/119300949