I am new to Twitter Bootstrap. I am working on a modal panel. When I click on button to display modal it displays but then it freezes. If I click on close button or aside of modal nothing happens, modal is still there but “frozen”. Form fields are frozen also and I can’t use them.
This is my code:
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal"
data-target="#myModal">Launch demo modal</button>
<!-- Modal -->
<div class="modal fade" id="myModal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form>
<div class="modal-header">
<h5 class="modal-title">Modal title</h5>
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-group label-floating">
<label class="control-label">Username</label>
<input type="text" class="form-control" />
</div>
<div class="form-group label-floating">
<label class="control-label">Email address</label>
<input type="email" class="form-control" />
</div>
<div class="form-group label-floating">
<label class="control-label">Fist Name</label>
<input type="text" class="form-control" />
</div>
<div class="form-group label-floating">
<label class="control-label">Last Name</label>
<input type="text" class="form-control" />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">Save
changes</button>
<button type="button" class="btn btn-secondary"
data-dismiss="modal">Close</button>
</div>
</div>
</form>
</div>
</div>
</div>
2
Answers
Here you go with the solution https://jsfiddle.net/nLu3s675/
I found solution that have worked for me. I have placed my modal under another bootstrap class, if you check code above
That’s why my modal was frozen on any action. When I have removed it under those classes and just placed it under
<body>
tag it worked.It seems it was css style conflict.
So it looks like:
Hope it helps someone with same issue.