Skip to main content

Bug Tracker

Side navigation

#3462 closed bug (invalid)

Opened October 08, 2008 02:10PM UTC

Closed October 29, 2010 04:02AM UTC

Multinamespaced event handler bug

Reported by: morgan Owned by: brandon
Priority: low Milestone:
Component: event Version: 1.2.6
Keywords: event namespace bind Cc:
Blocked by: Blocking:
Description

As first described by Yehuda and reported to jquery-dev mailing list by Brandon Aaron http://groups.google.com/group/jquery-dev/browse_thread/thread/91adffebadfd0a53/2db48b9d486bc45e

Summary of the bug. If binding an event with one handler in two (or more) different namespaces, only the last one is bound. This happens because the namespace is not checked on other events when binding new ones. So each time a new namespaced event is bound, the old one(s) are overrun.

This patch is more of a working proof on concept, but it does pass all the event test cases. What is does is adds a default namespace ("*") to any event not containing a namespace. The event cache structure is also changed.

/cache/jq.uid/event/handle.guid(.type)

becomes

to /cache/jq.uid/event/namespace/handle.guid.

So events without a namespace ('click') end up in something like /cache/15/click/*/3().

Where an event with a namespace ('click.custom') would be /cache/15/click/custom/3()

Attachments (1)
  • event_namespaces.patch (4.2 KB) - added by morgan October 08, 2008 02:10PM UTC.

    Patch to add better event namespace support

Change History (1)

Changed October 29, 2010 04:02AM UTC by rwaldron comment:1

milestone: 1.3
priority: majorlow
resolution: → invalid
status: newclosed

No longer applicable. If this can still be reproduced, we will gladly reopen.