hafriedlander / jquery.entwine

Concrete UI programming library for jQuery
BSD 3-Clause "New" or "Revised" License
151 stars 15 forks source link

Custom CMS action won't stop propagation #30

Open KINKCreative opened 8 years ago

KINKCreative commented 8 years ago

Did a custom action with betterbuttons, basically link at bottom of a DataObject edit form. Something sets clicking those links to target / reload the edit form itself. I wanted to stop propagation, and to use Entwine.

Tried all of these:

$('.open-in-new').entwine({
    onclick: function(e) {
      window.open($(this).attr("href"));
      e.stopImmediatePropagation();
      e.preventDefault();
      e.stopPropagation();
    }
  });

A simple jQuery stopPropagation, however, works. Just curious if there's a 'correct' way of doing it as I'd like to learn to use Entwine more. Thanks!