Bootstrap pop-up box modal upper-level input box does not get focus problem solving method _javascript Tips

Source: Internet
Author: User
Tags button type

The Bootstrap pop-up box modal the upper level of the input box does not receive the focus problem, the details are as follows

1. The current modal pop-up box supports only one layer in the use of the bootstrap frame

That is, you can no longer use the modal pop-up box on the current pop-up box.
If you use a custom pop-up box, for example: http://my.oschina.net/tianma3798/blog/737232
If the input input box is in the Custom pop-up box, if the input input box does not have the focus, the following may be the cause:
Many uses define the pop-up layer

<div class= "Modal Fade" tabindex= "0" role= "dialog" id= "Mymodal" data-backdrop= "static" > <div class= "Modal-dia" Log Modal-lg "> <div class=" modal-content "> <div class=" Modal-header "> <button type=" button "cl ass= ' close ' data-dismiss= ' modal ' aria-label= ' close ' ><span aria-hidden= ' true ' >x</span></button  
   > 

The solution is to remove the tabindex= "0" attribute and then get the focus.

<div class= "Modal Fade" role= "dialog" id= "Mymodal" data-backdrop= "Static" >

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.