Resolve Bootstrap modal encountered Esc key could not close page

Source: Internet
Author: User
Tags close page

Bootstrap, from Twitter, is currently the most popular front-end framework. Bootstrap is based on HTML, CSS, JAVASCRIPT, it is simple and flexible, making Web development faster. However, in the use of the process, we will still encounter a variety of small problems, today we are talking about the use of personal experience in a small bug repair.

Bootstrap provides us with a lot of handy page controls, and modal is one of them. Many people have encountered an ESC key press failure to close when using modal, even if the explicit incoming keyboard option does not take effect.

$ (' #editFormItemModal '). Modal ({show:true, keyboard:true});

This issue is in the version after 2.1, to solve this problem is also very simple, modal the div add a TabIndex property can:

<div class= "Fade Modal" tabindex= "-1" >

The problem is simple, the repair is also very simple, I hope to be able to help.

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.