title: Modal window blocks my page
body: <p>I have a modal window but when I close the modal my page is blocked. I can not do anything. I need to refresh the page to get everything working again!
  The strange is that sometimes everything works well or sometimes everything is blocked!</p>
  
  <p>The button that opens the model:</p>
  
  <pre><code>&lt;button type="button" class="btn btn-success" data-toggle="modal" data-target="#myModalCode"&gt;Approve&lt;/button&gt;
  </code></pre>
  
  <p>My modal window code:</p>
  
  <pre><code>&lt;!-- Modal--&gt;
  &lt;div class="modal fade" id="myModalCode" role="dialog"&gt;
      &lt;div class="modal-dialog modal-sm"&gt;
          &lt;div class="modal-content"&gt;
              &lt;form id="formUpdateProgress" &gt;
                  {!! csrf_field() !!}
                  &lt;div class="modal-header"&gt;
                      &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
                      &lt;h4 class="modal-title"&gt;Complaint Progress&lt;/h4&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-body"&gt;
                      &lt;label class="control-label"&gt;Insert code:&lt;/label&gt;
                      &lt;div id='complaintProgress' style="position: relative;"&gt;
                          &lt;input type="text" name="code" id="code" placeholder="Insert the code here"&gt;
                      &lt;/div&gt;                   
                  &lt;/div&gt;
                  &lt;div class="modal-footer"&gt;                              
                      &lt;button type="button" class="btn btn-danger" data-dismiss="modal"&gt;Close&lt;/button&gt;
                      &lt;button type="submit" class="btn btn-success"&gt;Submit&lt;/button&gt;
                  &lt;/div&gt;
              &lt;/form&gt; 
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;!-- END MODAL --&gt;
  </code></pre>
  
  <p>When I submit the form, I close the model!</p>
  
  <pre><code>$( '#formUpdateProgress' ).on( 'submit', function(e) {
      $('#myModalCode').modal('hide');
  });
  </code></pre>
  
  <p>EXAMPLE:</p>
  
  <p>Modal window in my application:
  <a href="https://i.stack.imgur.com/lybmz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lybmz.png" alt="Modal window example"></a></p>
  
  <p>Then I click Submit, everything works ok, the document is approved but something is locking the page:
  <a href="https://i.stack.imgur.com/pmVaP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pmVaP.png" alt="After submit everything is blocked"></a></p>
  
  <p><strong>Any idea why the page is blocked?</strong> Thanks in advance</p>