title: Bootstrap: allow opening a modal without activating collapse on parent
body: <p>Simple situation here: I have a Bootstrap 4 table with rows that I want to be clickable to expand additional, hidden rows. So the entire tr has data-toggle=&quot;collapse&quot;. However, inside that TR are some buttons that I want to open modals without activating the collapse. I can't seem the get that working, I've tried:</p>
  <pre><code>      $('tr[data-toggle=&quot;collapse&quot;]').click( function(e) {
          if (e.target.tagName != &quot;TD&quot;) { 
            e.target.click();
            e.stopPropagation();
          }
        });
  </code></pre>
  <p>But this just prevents modals from showing up. I have also tried to capture clicks on the buttons, check the targets and only call .modal('show') if the targets are buttons, stopping propagation otherwise, but this causes the modals to show and then close immediately.</p>