Ionic-framework: Alert should auto focus first input

Created on 2 Jan 2019  路  3Comments  路  Source: ionic-team/ionic-framework

Prompts don鈥檛 auto focus first input

core bug

Most helpful comment

There might be challenges if running on a mobile device (due to keyboard popup) but it seems like you would always want to set focus on a desktop web page. Most web apps (including GitHub) set input focus when you click on buttons that lead to data entry. It seems very awkward to click on a button, have an alert displayed to enter a value, and still have to click in the input before entering the value.

All 3 comments

That should be a setting. Otherwise there will always be a software keyboard popup on mobile platforms.

Not that easy, since element.focus() is noop if it's not coming from an user interaction.

There might be challenges if running on a mobile device (due to keyboard popup) but it seems like you would always want to set focus on a desktop web page. Most web apps (including GitHub) set input focus when you click on buttons that lead to data entry. It seems very awkward to click on a button, have an alert displayed to enter a value, and still have to click in the input before entering the value.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexbainbridge picture alexbainbridge  路  3Comments

giammaleoni picture giammaleoni  路  3Comments

brandyscarney picture brandyscarney  路  3Comments

manucorporat picture manucorporat  路  3Comments

RobFerguson picture RobFerguson  路  3Comments