Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom CMS action won't stop propagation #30

Open
KINKCreative opened this issue Dec 21, 2015 · 0 comments
Open

Custom CMS action won't stop propagation #30

KINKCreative opened this issue Dec 21, 2015 · 0 comments

Comments

@KINKCreative
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant