Bug Tracker

Modify

Ticket #3549 (closed bug: fixed)

Opened 5 years ago

Last modified 3 years ago

Binding multiple custom namespaced events is not working correctly

Reported by: Tim Molendijk Owned by: john
Priority: major Milestone: 1.4.1
Component: event Version: 1.4
Keywords: bind multiple custom namespaced events Cc:
Blocking: Blocked by:

Description

Consider the following snippet:

---

$().

bind('myevent.ns1', function() {console.log('myevent.ns1');}).

bind('myevent.ns2', function() {console.log('myevent.ns2');}).

bind('myevent.ns1 myevent.ns2', function() {console.log('myevent.*');});

$().

trigger('myevent.ns1).

trigger('myevent.ns2');

---

The result is that the following is printed to console:

---

myevent.ns1

myevent.ns2

myevent.*

---

While I would have expected:

---

myevent.ns1

myevent.*

myevent.ns2

myevent.*

---

Change History

comment:1 Changed 5 years ago by flesler

  • need changed from Review to Patch

That is indeed right. handler.type is simply being overriden.

comment:2 Changed 5 years ago by flesler

Note that this requires medium-big changes, it won't be fixed right away. But will be taken into account for the next release.

Thanks

comment:3 Changed 5 years ago by Tim Molendij

Cool. Thanks.

comment:4 Changed 4 years ago by john

  • Owner changed from brandon to john

comment:5 Changed 4 years ago by yehuda

  • Milestone changed from 1.3 to 1.3.3

comment:6 Changed 3 years ago by john

  • Status changed from new to closed
  • Version changed from 1.2.6 to 1.4
  • Resolution set to fixed
  • Milestone changed from 1.4 to 1.4.1

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.