Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
195 views

How to control opening primeng accordion content by a button placed on the accordion

I want to open the primeng accordion using a button that is placed in its custom header and i dont want the accordion to open if i click anywhere else. i am using primeng 11-lts version and this is my ...
Code Monkey's user avatar
1 vote
0 answers
172 views

TextInput component frozen when try to type something

I've created a child component for InputField and I used that component in my Signup.tsx page 4 times to make different type of InputField just like shown in the screenshot, but when I try to type ...
Web Developer's user avatar
0 votes
0 answers
32 views

Stop propagation of javasript/leaflet click event that starts in one element and ends in another

I have a Leaflet control that I add to the map using the code below. ... var FilterControl = L.Control.extend({ options: { position: 'topleft' }, onAdd: function(map) { ...
RCTW's user avatar
  • 115
0 votes
0 answers
30 views

wpf datagrid does not bubble the scrollwheel event [duplicate]

The scrollwheel does not work on a DataGrid inside a ScrollViewer, although the vertical scrollbar just works fine. I tested with this setup: <ScrollViewer> <StackPanel ...
Roland's user avatar
  • 5,126
1 vote
0 answers
41 views

Preventing from default behavior even though preventDafault() method has not been called yet

In this piece of code there is an element called container and a checkbox in it. There is an EventListener on the container which calls a function if a click event happens on its child or itself. This ...
thefreedevil1995's user avatar
0 votes
0 answers
45 views

Why does Pixijs use different elements for PointerEvent listeners?

I'm learning the source code of Pixijs, and I came across the part related to PointerEvent: self.document.addEventListener('pointermove', this.onPointerMove, true); this.domElement.addEventListener('...
ilharp's user avatar
  • 57
0 votes
1 answer
73 views

Why doesn't manual "reset" event bubble to a form element?

Why does the following not trigger the alert when clicking the button? document.addEventListener('reset', function(event) { alert('Reset clicked!'); }); document.querySelector('button')....
nfplee's user avatar
  • 7,967
0 votes
2 answers
225 views

How to allow a CLICK, through a UITableView, to buttons behind?

Imagine a large table view that's mostly transparent, with some elements here and there. (Perhaps there's a large gap between cells, or, picture the cells being mainly transparent with only a couple ...
Fattie's user avatar
  • 12.5k
2 votes
1 answer
707 views

React popover(modal) closes automatically after I click the open button (event listener)

Goal: I want to implement a popover(modal) in React. When the user click a button, then the popover is open. Close the popover when the user clicks outside of the popover. Logic: conditionally render ...
JXUHO's user avatar
  • 23
0 votes
1 answer
298 views

Custom event with 'composed: false' still catchable outside shadow DOM in StencilJS component

Can somebody explain me this behaviour? So, in Stencil js, i have custom event that i am emitting using @Event decorator which has {composed: false}. Why am i able to catch it outside of shadow DOM ...
saksonia's user avatar
2 votes
3 answers
568 views

Child element's click event prevented by parent's event.stopPropagation

On my (live site), I have a select element created using the 'nice-select' library. This select element is nested inside a dropdown menu, which has its own JavaScript file function singleMenu(...
Rocky Barua's user avatar
1 vote
2 answers
280 views

Hover states on React nested menu

In the following code I have a nested menu. On hover I wanted to add selected class name to the Nav.Item and only remove it when I hover over another Nav.Item. I could achive that with onMouseOver. ...
levipadre's user avatar
  • 619
2 votes
1 answer
1k views

I need to update state of blazor component when other component changed

I have a blazor page with different components. Component structure is the following: page component1 component11 component2 When event happens on component11, component2 should update ...
Alexan's user avatar
  • 8,585
1 vote
1 answer
68 views

Block the keyboard shortcut "Backspace" when a text filter is in edition and removing characters

In an app I'm working on there is a homemade CustomListView control that I cannot modify. In the same view there is a Button with a Keyboard shortcut "Backspace" to come back to the previous ...
Le ZVince's user avatar
1 vote
0 answers
105 views

How do I make an absolut positioned touchable element on top of a FlatList catch only press events and let other events propagate to the FlatList?

I have a FlatList in React Native with fullscreen image and video items (with pagingEnabled). I want to have a short descriptive touchable text floating on top of the FlatList, to open up a view with ...
Andain's user avatar
  • 163
1 vote
0 answers
66 views

Do disabled button's children bubble?

EDIT I think this has to do with custom elements. If I replace the button's child with a simple <p> we get the expected behavior (i.e. clicking on the child does not result in the parent's ...
Aaron Parisi's user avatar
1 vote
1 answer
464 views

VueJS - Click event is not triggered as parent event prevaults

I am building a search input that fetchs data from my API and lists it in a dropdown list. Here is the behavior I want my component to have: If I start typing and my API founds data, it opens the ...
Gaël Duval's user avatar
1 vote
1 answer
176 views

Prevent Mouseenter bubbling in an unorderest list of links in Vue 3

I have tried a lot of different things trying to stop event bubbling on the mousenter event but still have the problem, when I hover on a link the event triggers for all the links, like all of them ...
Lowtrux's user avatar
  • 196
0 votes
1 answer
30 views

Rails: Every entry in the search moves the content in <main> to go up one click

The basic layout of my code looks like this: <!doctype html> <html lang="en"> <head> ..... ..... </head> <body> <div> <%= form_tag("/search&...
saathipop's user avatar
1 vote
1 answer
37 views

Listen for non-bubbling events on any element

Is there a way to listen for a non-bubbling event on any element in the DOM tree? I want to listen for load events on any image that is created and loaded, without having to add events to every single ...
LuisAFK's user avatar
  • 937
2 votes
1 answer
348 views

How does stopPropagation cancel preventDefault?

I have a website that does not allow to open up the context menu by clicking the right button on a mouse. It seems like the website does blocking it by using preventDefault on the event oncontextmenu. ...
gtj520's user avatar
  • 317
2 votes
2 answers
1k views

How to have a different onClick event for the child element without affecting the parent one?

Having the following structure: <div class="the-parent"> <div> <a onClick="doParentStuff()"> <div> <i onClick="doChildStuff()&...
Leo Messi's user avatar
  • 6,116
0 votes
1 answer
26 views

How to add a one click statement to an event delegated function?

I've added an event listener via event bubbling to a parent element. On click, the function duplicates the source and inserts the clone after the source. After the source is cloned, I don't want it to ...
Chris M's user avatar
1 vote
1 answer
404 views

Event not Bubbling with addEventLsitener?

I think I have a conceptual error in my understanding of event bubbling in Javascript. addGlobalEventListener("click", ".green", (e) => { console.log("clicked green"); }); function ...
learyjk's user avatar
  • 719
1 vote
1 answer
93 views

Kivy: Events with Nested Layouts

I'm new to kivy and I don't understand how to handle event propagation. A minimal example of what I'm trying to do: # app.kv ListItem: SomeIcon: class ListItem(MDBoxLayout): def on_touch_down(...
Pypax's user avatar
  • 103
1 vote
0 answers
105 views

Event bubbling issue: click function does not wait for blur function containing observable

I am have a modal which contains some inputs. Those inputs are validated on blur, which includes making a call to an endpoint and subscribing to it to get whether or not the input is valid/invalid. ...
tb517's user avatar
  • 409
1 vote
1 answer
2k views

Why is the parent scroll event getting triggered , when scrolling inside child,

From what I know scroll event doesn't get bubbled to the parent and only bubbles document itself then why parent scroll event is getting fired, import { useEffect, useRef } from "react"; ...
Shishir Tiwari's user avatar
0 votes
0 answers
45 views

Popup - Event propagation issue - popup not closing when clicking outside of DIV

I know my issue is event propagation related, but I can't manage to figure it out. The code I attached is a loop on the page with a couple of items. function popItUp() { document.querySelector("....
Pbalazs89's user avatar
  • 168
2 votes
1 answer
934 views

Clicking a child component affects parent in an unexpected way

I have two components, Container and Item. Container contains Item. Item contains a button and a div. These components have the following behaviors: Container: When I click outside of Container it ...
GhostOrder's user avatar
0 votes
0 answers
46 views

Bubbling in two children - JS

There is large square and small square that the large square is the top layer. When I click only on the large square I want that the click event of the large square will play. When I click on the ...
Ofir Salem's user avatar
0 votes
3 answers
54 views

jQuery event listener fires before selector applied

I am trying to make a system that would require an admin to click a delete button twice before it fires the action. if he focusout of the button, it resets. $(".unarmed").css("filter", "grayscale(...
Noam Smadja's user avatar
  • 1,035
1 vote
2 answers
3k views

React onClick event firing for child element

Click Handler. const handleClick = (event) => { console.log(event.target); } Return. { menu.map((menuItem, index) => ( <div onClick={handleClick}> <div>{...
Lucas Mace's user avatar
4 votes
1 answer
2k views

Pressing enter while focused on input causes sibling button to fire

In a react app, there's a form with some buttons and input as below: <form> <div> { ['1', '10', '100'].map(val => ( <button onClick={() => console.log(val)}>...
tomyhomie's user avatar
  • 372
0 votes
1 answer
375 views

tinyMCE v6 event bubbling

I trying to catch keydown triggered on < p > element inside of editor iFrame but with this code, i getting textarea element. Event.stopPropagation() does not stop bubbling, i still getting ...
Pavel Egorkin's user avatar
1 vote
0 answers
358 views

Ngx-pagination not working after a click event in dialog box due to event bubbling

Currently i'm working on pagination and showing agm-maps in a project. The problem is that the ngx-pagination is not working if i click the icon with a click event attached to it. don't know where i'm ...
Gowri Shankar's user avatar
2 votes
1 answer
3k views

How to prevent event bubbling in blazor server side?

In my blazor server side application I have cards representing datasets, which the user can manage. They look like this: The relevant code looks like this: <div class="card h-100 text-dark&...
Roland Deschain's user avatar
10 votes
2 answers
5k views

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 ...
csha's user avatar
  • 9,534
0 votes
2 answers
77 views

How to stop onmouseleave() from 'bubbling' to other siblings using vanilla JS?

I put the below code up on gileslewey.com so you can see the issue easily. I have remote, animated .gif rollovers set for each span tag in a series of heads--I used <span> to vertically center ...
Giles Lewey's user avatar
4 votes
2 answers
673 views

Do events bubble in microtasks?

On click, this outputs 1 then 2: const myElem = document.getElementById("myElem") myElem.addEventListener('click', () => queueMicrotask(() => console.log(1))); window.addEventListener('click'...
Alexey Berezkin's user avatar
4 votes
0 answers
334 views

Event bubbling on pure javascript object

I want to implement event system on pure js object that similar to the DOM events, which can be dispatched and bubbling from child to parent object. Can I use existing interfaces like EventTarget or ...
liyuqihxc's user avatar
1 vote
1 answer
1k views

Using event delegation (bubbling) in web component with slot problem

I create this simple example (pure JS, not in Vue or React, etc.): <body> <script> (function () { class MyComponent extends HTMLElement { constructor() { ...
Qiu Weishi's user avatar
0 votes
1 answer
1k views

Google Map API - Map click event not fired under Polygon, Circle, Rectangle?

In Google Maps API, when listening to click events from the Map object, the event will not be fired when a Polygon, Circle, Rectangle is clicked. How to bubble up the click event to the Map object? ...
Gil Epshtain's user avatar
  • 9,742
-1 votes
2 answers
1k views

Javascript - Remove event listener at resize

I'm doing some work to make navigation fully accessible by mouse over, keyboard and click, depending on the resolution. I am looking for that in mobile, only the click works. And hover, click, ...
TGO's user avatar
  • 216
1 vote
1 answer
554 views

Event not Bubbling to Parent Element from Child Element

I read the article on https://javascript.info/bubbling-and-capturing about Bubbling. According to the article, the following event on the article tag with id="article" should have bubbled to ...
Abhinav Jha's user avatar
0 votes
3 answers
401 views

How can I trigger a function only when only child divs are clicked using event bubble?

const handleMenu = e => { console.log(e.target); e.stopPropagation(); } I want to console the event when a child div is clicked. for example: <div onclick={handleMenu}> &...
Md Nasir Ahmed's user avatar
1 vote
0 answers
237 views

Bootstrap table buttons firing onlick multiple times

Global.Js file function operativeEvents() { $('.tableButton').off().click(function (e) { var $this = $(this), tableId = $this.parents('table').attr('id'), $table =...
Nicholas McIver's user avatar
0 votes
1 answer
490 views

How to capture the most exterior element when click event occurs

I need to get the most element when clicking in a div... Such as this... <div id="show_trash_id" class="switch switch-xs"> <input type="checkbox"/> <...
lucasbbs's user avatar
  • 307
0 votes
2 answers
7k views

How does one prevent the opening of a new tab or window when hyperlink behavior was created virtually by e.g. an HTML button's "click" event handling?

I can disable opening new tab or window in case of <a> tag by removing target attribute e.g. target='_blank' In some cases instead of <a> website put <button> and add onClick() or ...
Alok's user avatar
  • 10.3k
-2 votes
1 answer
119 views

WPF Event Not Bubbling to the WIndow

Here's the C# code: public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void Button_Click(object sender, RoutedEventArgs e) { ...
Ron's user avatar
  • 2,503
0 votes
1 answer
403 views

Difference between @click="$emit("myFunction")" and @click="emitFunction"

Is there any difference between two of them? And which one is best practice?
maikidev's user avatar

1
2 3 4 5
12