Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7861923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:55:54+00:00 2026-06-02T22:55:54+00:00

My basic issue is that I have a click event that i have attach

  • 0

My basic issue is that I have a click event that i have attach to my container, i am trying to delgate that click event just to the buttons in that container. All of that is easy, the issue i have is the event.target in webkit is hitting the spans in the button instead of the button its self. How do i stop the click event from bubbling down wards to the span in the button. I want my targ to be the butto. here is a quick demo showing the issue fiddle of the issue

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T22:55:55+00:00Added an answer on June 2, 2026 at 10:55 pm

    I have no idea if it is possible to disable event bubbling is this case.

    However in these cases I make a inverted event bubbling:

    while(targ != null) {
        if (targ.nodeName.toLowerCase() === 'button') {
            alert(targ.nodeName.toLowerCase());
            break;
        }
    
        targ = targ.parentElement;
    }
    

    Fiddle: http://jsfiddle.net/jVeMw/1/

    Is not perfect for performance but since you are restricting the click event to the vidCommentBoard div it should not be a problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a GUI that is for all intents and purposes really basic. A
I have a very basic databinding issue with the Visifire WPF charting tool in
I'm trying to create a basic shopping cart, having an issue with the product
Ran into an issue today that I have not been able to resolve. I
I'm trying to setup Web Deploy on IIS 7, so that 1-click publishing in
Currently, I have an issue with populating an iframe that I have with a
I am trying to base my application on callbacks. The issue that bothers me
I have a basic toggle switch that shows the clicked on div while closing
I have just noticed recently that my page title will reset to the standard
I'm having an issue using a new WPF app that is trying to display

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.