ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.47k stars 13.53k forks source link

bug: Auto foucs in ios not work (ionic vue) #29365

Closed Sujuforny closed 3 weeks ago

Sujuforny commented 3 weeks ago

Prerequisites

Ionic Framework Version

v7.x, v8.x

Current Behavior

When I route to new page and the page have input box .I wanna set auto focus on this input box

Expected Behavior

It focus on the input box but keyboard not up (only ios)

Steps to Reproduce

click to new page and set focus

Code Reproduction URL

https://github.com/Sujuforny/autoFoucsIOS.github.io.git

Ionic Info

@ionic/vue:6+,

Additional Information

IDK

liamdebeasi commented 3 weeks ago

Thanks for the report. Please see https://ionicframework.com/docs/developing/managing-focus for information on how you can manage focus as well as the limitations that autofocus has on iOS. (In short, we recommend using the setFocus method instead of the autofocus property)