Questions tagged [event-propagation]

Event propagation, or "bubbling", occurs when an event occurs inside an element, which is stacked in other elements.

Event propagation, or "bubbling", occurs when an event occurs inside an element, which is stacked in other elements. In this case the event is being dispatched from the innermost element towards the outermost element. Event propagation can be stopped programmatically, even though it might cause unexpected results.

236 questions
5
votes
1 answer

How can I bubble up an Ember action inside a callback function?

I have an Ember application and I am using an action to apply a CSS animation. Once the animation is complete I want to bubble up the action from the controller to my route to handle further functionality. I know that if I return: true; the action…
Michael Lynch
  • 2,682
  • 3
  • 31
  • 59
5
votes
4 answers

stopPropagation() "Prevents the event from bubbling up the DOM tree" : what does it means?

I don't really understand what e.stopPropagation() do. If I have a link using return false to the handler I should get what I want (prevent the default link behaviour, so it doesnt "call" the next href location) :
markzzz
  • 47,390
  • 120
  • 299
  • 507
4
votes
1 answer

jeditable propagation

i'm using jeditable and I have nested elements all binded to jeditable. Problem is when I click on a nested element the click event gets triggered on the top most parent. How can I avoid this ? $(document).ready(function() { …
Alex
  • 247
  • 1
  • 13
4
votes
1 answer

Why capturing stage doesn't get interrupted with event.stopPropagation?

If you run this code and click on P, the whole capturing stage is executed but the bubbling stage is stopped as expected on div. What's the issue with this code? for(let elem of document.querySelectorAll('*')) { …
4
votes
1 answer

Propagating data from Redis slave to a SQL database

I'm using Redis for storing simple key, value pairs; where, value is also of string type. In my Redis cluster, I've a master and two slaves. I want to propagate any of the changes to the data from one of the slaves to any other store (actually,…
ptntialunrlsd
  • 794
  • 8
  • 23
4
votes
1 answer

QML - Can't get mouse released event when I don't accept mouse pressed event

I would like to dispatch my onPressed event to subsequent objects in my QML tree, (I have indicate mouse.accepted = false and propagateComposedEvents: true ) but I want to keep the onreleased event working on the top level element .. Here the code :…
Geoffroy
  • 173
  • 1
  • 10
4
votes
1 answer

Why is a click on a nested element not bubbling up to it's parent with the click binding?

I have this HTML:

Some

Text

and this binding: $(document).on("click", ".action", function (e) { var do = e.target.getAttribute("data-action"); if (do === undefined || do ===…

frequent
  • 27,643
  • 59
  • 181
  • 333
4
votes
1 answer

Excluding form fields from keypress handler assigned to body

I have a keypress handler on a web page assigned to the body element. I really do want it to be active anywhere in the web page. Or so I thought. The keypress events in textual input forms also activate the body handler, which makes sense, but…
wfaulk
  • 1,765
  • 1
  • 17
  • 24
4
votes
2 answers

jQuery parent and child divs activating different actions

I have an element that contains many components within it. Lets call this element box. Now inside the box I have many different elements, pictures, text and buttons. Example: http://jsfiddle.net/roman_khrystynych/FSCRH/ HTML:
3
votes
2 answers

How do you stop children from propagating an event triggered by a live/delegate listener?

I have a delegation parent that listen for click events in a set of children with a specific class. $(".toggle_group").on("click",".toggle",function(e){ .. }); so heres an example of the html
qodeninja
  • 10,946
  • 30
  • 98
  • 152
3
votes
0 answers

Propagating Baggages with Opentelemetry.Baggage API in .NET

Say I have 3 microservices, and I want to trace requests using OpenTelemetry/Jaeger UI. How do I add baggages that propagate through the spans? Say I have one API called WeatherForecast which performs a get request to another service called Matrix,…
3
votes
2 answers

event propagation cdk drag

How can I prevent dragging when I'm inside my input and I'm dragging around. I only want the pink-meat to act as a drag-handle. !!! STACKBLITZ !!! html
Andre Elrico
  • 10,956
  • 6
  • 50
  • 69
3
votes
2 answers

How to stop Jquery function from running?

Newbie here. Probably because I'm already sleepy and can't find a solution. I'm trying to stop a function when I click on another button. Here's the code so far: When I click on a button (.start), it runs a function that messes up the text randomly…
Sara Silva
  • 85
  • 2
  • 8
3
votes
1 answer

Unity Prevent Click On Button

I'm creating a script for a long button press. The long button press works, The only issue is that if the long button press triggers I want to prevent the click on the button. using UnityEngine; using UnityEngine.Events; using…
johnny 5
  • 19,893
  • 50
  • 121
  • 195
3
votes
4 answers

Propagation of custom events

I expect my CustomEvent to be propagated from document to all the DOM elements. For some reason, it does not happen. What am I doing wrong?