question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stopping Event Propagation

See original GitHub issue

Is there a way to stop event propagation when clicking the trigger similar to how it can be stopped with actions using bubbles=false such as below?

<a href="some_url">
My link
<button {{action 'showDetails' bubbles=false}}>Extra Info</button>
</a>

I have a link with lots of content and want one part of that content is to be a dropdown (or clickable tooltip) that when clicked only shows the dropdown content and does not trigger the link.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cibernoxcommented, Jul 19, 2017

I believe this can be closed now.

0reactions
cibernoxcommented, Jul 7, 2017

FWIW, I decided that it was time to tackle that. Now the component can open/close with click events instead of mousedown, but the user must explicitly choose that.

{{#basic-dropdown as |dd|}}
  {{#dd.trigger eventType="click"}}Click me{{/dd.trigger}}
  {{#dd.content}}Content{{/dd.content}}
{{/basic-dropdown}}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Event.stopPropagation() - Web APIs | MDN
The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
Read more >
jQuery event.stopPropagation() Method - W3Schools
The event.stopPropagation() method stops the bubbling of an event to parent elements, preventing any parent event handlers from being executed. Tip: Use the ......
Read more >
How to Stop Propagation of an Event in JS - JavaScript Tutorial
To stop an event from further propagation in the capturing and bubbling phases, you call the Event.stopPropation() method in the event handler. Event....
Read more >
What's the difference between event.stopPropagation and ...
If the capturing EventListener wishes to prevent further processing of the event from occurring it may call the stopPropagation method of the Event...
Read more >
Event Bubbling and Event Catching in JavaScript and React
To prevent other events on the same element from firing, use event.stopImmediatePropagation() instead. It will stop both parents and the same ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found