Loading ...

Twitter bootstrap multiple modals not working, browser crashing | CodeAsp.Net

Twitter bootstrap multiple modals not working, browser crashing

 /5
0 (0votes)

Today I was trying to open multipl Twitter bootstrap modal one above the other i.e in stack. After the second modal initiate script ".modal('show')' the Chrome was getting crashed. Below is the screen which I was getting after trying to to open the second modal from the first modal.

Issue:

The issue was because of recursive calls which two modals do while ficusing because of following line:

that.$element.focus()

inside the "enforceFocus" method inside bootstrap-modal.js plugin

 

Solution:

The solution was to comment out the line:

 

You can set the second modal z index greater than the first index.

Comments (no comments yet)

Top Posts