Opened 14 years ago
Closed 12 years ago
#3462 closed bug (invalid)
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)
Change History (2)
Changed 14 years ago by
Attachment: | event_namespaces.patch added |
---|
comment:1 Changed 12 years ago by
Milestone: | 1.3 |
---|---|
Priority: | major → low |
Resolution: | → invalid |
Status: | new → closed |
No longer applicable. If this can still be reproduced, we will gladly reopen.
Patch to add better event namespace support