Modify ↓
Ticket #5303 (closed bug: fixed)
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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Patch