Bug Tracker

Modify

Ticket #8550 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

Incorrect custom event bind

Reported by: perfectworks@… Owned by: dmethvin
Priority: undecided Milestone: 1.next
Component: event Version: 1.5.1
Keywords: Cc:
Blocking: Blocked by:

Description

 http://jsfiddle.net/KYT5H/1/

Both document & document.body has beean binded a custom event "error". When some element trigger a custom event "error.network", only document's event handler triggered;

Change History

comment:1 follow-up: ↓ 2 Changed 2 years ago by dmethvin

  • Owner set to perfectworks@…
  • Status changed from new to pending
  • Component changed from unfiled to event

Thanks for your time and interest in helping out with the jQuery project, but this is not a valid bug report. We require that all tickets have a valid and reproducible test case on  jsFiddle in order for us to audit the issue. What you've placed here does not even include any Javascript or jQuery! If you can build a testcase that duplicates the error you've described here, we will be happy to take a look at it. If you need support, please head to the  jQuery Forum or the #jquery IRC channel on irc.freenode.net. Thanks again!

comment:2 in reply to: ↑ 1 Changed 2 years ago by perfectworks@…

  • Status changed from pending to new

Yes, I've post a testcase in jsFiddle:  http://jsfiddle.net/KYT5H/1/. It include jQuery 1.5.1, Please take a look at it.

Replying to dmethvin:

Thanks for your time and interest in helping out with the jQuery project, but this is not a valid bug report. We require that all tickets have a valid and reproducible test case on  jsFiddle in order for us to audit the issue. What you've placed here does not even include any Javascript or jQuery! If you can build a testcase that duplicates the error you've described here, we will be happy to take a look at it. If you need support, please head to the  jQuery Forum or the #jquery IRC channel on irc.freenode.net. Thanks again!

comment:3 Changed 2 years ago by danheberden

Your test case had extra <html><body> tags - here's a clean version ( problem sill persistant )

 http://jsfiddle.net/danheberden/KYT5H/5/

comment:4 Changed 2 years ago by danheberden

Using a non-native event name:  http://jsfiddle.net/danheberden/KYT5H/6/

comment:5 Changed 2 years ago by cowboy

Here's a more thorough test case:

 http://jsfiddle.net/cowboy/RbwZE/

There are two issues here:

The first, reported separately in #8712, is that custom events don't bubble up to window.

The second, more relevant, issue is that namespaced event handlers appear to be firing even when the appropriate namespace wasn't specified when triggering. This doesn't occur on the originating element, it only occurs during propagation.

comment:6 Changed 2 years ago by dmethvin

  • Owner changed from perfectworks@… to dmethvin
  • Status changed from new to assigned

comment:7 Changed 2 years ago by dmethvin

  • Status changed from assigned to closed
  • Resolution set to fixed

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.