How to Set focus to first text input in a bootstrap modal after shown

后端 未结 16 1174
感情败类
感情败类 2020-12-07 15:12

I load a dynamic bootstrap modal and it contains few text inputs. The issue i face that i want the cursor to focus on the first input in this modal, and this is not happenin

16条回答
  •  南笙
    南笙 (楼主)
    2020-12-07 15:50

    Try to remove the tabIndex property of the modal, when your input/textbox is open. Set it back to what ever it was, when you close input/textbox. This would resolve the issue irrespective bootstrap version, and without compromising the user experience flow.

提交回复
热议问题