Bug Tracker

Modify

Ticket #5303 (closed bug: fixed)

Opened 4 years ago

Last modified 3 years ago

calling remove/handle() with multiple namespaces

Reported by: rkatic Owned by: brandon
Priority: major Milestone: 1.4
Component: event Version: 1.3.2
Keywords: namespaces Cc:
Blocking: Blocked by:

Description

Both functions generates the RegExp that doesn't work properly when it have to test presence of more namespaces.

The two identical lines in event.remove() and event.handle():

var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\
\.") + "(\\.|$)");

would be:

var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join("\\.
(?:.*\\.)?") + "(\\.|$)");

Change History

comment:1 Changed 4 years ago by rkatic

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.