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
10
votes
3 answers

Event Bubbling, and Stop Propagation

What is the difference between event.bubbles to false for any event, and setting event.stopPropagation() or stopImmediatePropagation() while handling event? I'm using Flex4 with AS3.
10
votes
1 answer

How to stop event propagation on calling a function on change of mat-checkbox?

handleProductClick(selectedProd : Product, event: any) { event.stopPropagation(); } If I…
blueCloud
  • 393
  • 1
  • 4
  • 11
10
votes
5 answers

AngularJS: How to stop event propagation from ng-click?

I have directive that does something like so: app.directive('custom', function(){ return { restrict:'A', link: function(scope, element){ element.bind('click', function(){ alert('want to prevent…
Stepan Suvorov
  • 25,118
  • 26
  • 108
  • 176
9
votes
5 answers

How to achieve re-useable components with React and mouse event propagation?

Consider the following typical React document structure: Component.jsx content Where these components are composed as…
Tom
  • 8,536
  • 31
  • 133
  • 232
9
votes
2 answers

Detecting Mouse Events on Multiple Overlapping SVG Elements

I'm trying to detect mousemove events on partially overlapping SVG elements, as in this image fiddle
Micha Schwab
  • 786
  • 1
  • 6
  • 21
8
votes
3 answers

Stop event bubbling - increases performance?

If I'm not returning false from an event callback, or using e.stopPropagation feature of jQuery, the event bubbles up the DOM. In most scenarios I don't care if the event bubbles or not. Like with this DOM structure example: ​
gdoron
  • 147,333
  • 58
  • 291
  • 367
8
votes
2 answers

Stop event bubbling from Flutter Listener widget

I'm making an Android app in Flutter and I want to add an interactive widget that listens to raw pointer events and reacts to them. This is easy to do using the Listener widget: class _MyWidget extends State { @override …
m93a
  • 8,866
  • 9
  • 40
  • 58
8
votes
2 answers

Javascript/jquery, get all divs location at (x,y). Forwarding touches?

Possible Duplicate: How to get a list of all elements that resides at the clicked point? I know I can get the element with the highest z-index by using document.elementFromPoint(x,y). The problem is I need to get every div that contains the touch…
Dustin Jackson
  • 377
  • 4
  • 13
7
votes
3 answers

QML InputHandler stop propagation of event

I have two Rectangles, each with a TapHandler. Rectangle A is the parent of Rectangle B How can I configure A and B, so that when B is clicked, the EventPoint does not propagate to the onSingleTapped handler of A? The EventPoint docs suggest to set…
skaldesh
  • 1,325
  • 3
  • 15
  • 37
6
votes
3 answers

How to prevent event bubbling in Angular 8?

Please understand, I'm new in Angular and developing overall so this might be a very unexperienced problem. The problem is that I am calling a function from a component's HTML template file with $event as an argument and it ends up capturing a…
Alek Carvajal
  • 101
  • 1
  • 2
  • 6
6
votes
1 answer

When is good practice to use stopPropagation()?

There have been some attempts to answer this question: here, here and here. However none of the answers are giving a solid response. I'm not referring to the event phases capture, bubble and target and how stopPropagation() affects the overall…
6
votes
1 answer

jquery mobile - custom select menu in a popup

Please find the below fiddle http://jsfiddle.net/yesvin/Xj8p8/
5
votes
2 answers

event.stopPropagation() not working in chrome with jQuery 1.7

For some reason clicking the document isn't working in Chrome (the closeQuickView is not being called). The elements are loaded via AJAX and so need to have .on() action (previously .live() which is now deprecated in jQuery 1.7) Used the example…
Craig
  • 972
  • 3
  • 13
  • 38
5
votes
3 answers

Propagation issue with sub-menus

On my page (pass = "shooga1"), clicking on COLLECTIONS (left sidebar) displays a sub-menu containing one item named "COLLECTION #1". Clicking on this items display yet another sub-menu, whose items for some reason cannot be clicked. Why not? Here's…
drake035
  • 3,955
  • 41
  • 119
  • 229
5
votes
1 answer

How to get proper event propagation with hammer.js 2?

I'm using Hammer.js 2.0.4 in a situation where I have two hammerjs instances to listen for tap events: on in a parent div element, and one in a child. I would like to stop event propagation when handled by the child. However, hammer.js 2 does not…
Jos de Jong
  • 6,602
  • 3
  • 38
  • 58
1
2
3
15 16