DivineChef
DivineChef

Reputation: 1221

Bootstrap Modal disabling text fields from child DIV

I created a popup within a bootstrap modal by simply creating a div, hiding it and then showing it onclick; I set the z-index to 9999 so it would appear on top of all modals. When you click the button to show the div there's now problem but when it's within a modal the text and textarea fields are disabled, you cannot enter anything.

The source can be found on this fiddle but for some reason the JavaScript doesn't work for the popup I made (any ideas?)

You can find a complete working demo at this webpage.

NONWORKING JS IN FIDDLE

        function showBigProb() {
    if (document.getElementById("ShowProbBtn").onclick) {
    document.getElementById("BigNewProblem").style.display="block";

    }
}

    function closeBigProb() {
    if (document.getElementById("closeProbBtn").onclick) {
    document.getElementById("BigNewProblem").style.display="none";

    }
}

Upvotes: 1

Views: 1332

Answers (1)

joshhunt
joshhunt

Reputation: 5335

I don't know why but its got something to do with tabindex="-1" being on the modal, as soon as that is removed it starts working.

Upvotes: 1

Related Questions