Skip to main content

Bug Tracker

Side navigation

#3577 closed bug (invalid)

Opened November 05, 2008 03:35PM UTC

Closed November 11, 2008 12:36PM UTC

Event binding with namespace fails

Reported by: das-peter Owned by: brandon
Priority: major Milestone: 1.3
Component: event Version: 1.2.6
Keywords: event namespace binding Cc: das-peter
Blocked by: Blocking:
Description

On FF3 the binding of events together with a namespace fails.

The events are registered but the namespace is lost.

The error happens in the jQuery.js on line 1871.

Code:

 // Namespaced event handlers
 var parts = type.split(".");
 type = parts[0];
 handler.type = parts[1];

This part fails: handler.type = parts[1];

The type is not registered correctly. If you check it in firebug with console.log(handler.type); it seems correct, but if you check later events[type][handler.guid] firebug displays the object and the parameter "type" - but the parameter is undefined. Same thing happens then in the unbind() method and so the namespace is "useless" (for example the reacitvate of the links after close a modal ui.dialog fails)

A workaround for that issue is this:

 handler = jQuery.extend(handler,{ type: parts[1] });

I think this Overhead generates some overhead, so better fix would be nice.

Cheers,

Peter

(Maybe the following ticket is related to this: http://dev.jquery.com/ticket/3462 )

Attachments (0)
Change History (3)

Changed November 06, 2008 09:42PM UTC by flesler comment:1

cc: → das-peter
need: PatchTest Case

That works regularly. Something must be interfering.

Can you provide a test case ? a minimalistic html file with the requires html and js to reproduce the problem.

Changed November 11, 2008 08:47AM UTC by das-peter comment:2

Hi flesler,

you're right. I've tested it again using a example as minimalistic as possible and it works like a charm. The issue happend in a prototyping environment - which has a lot of other libraries. (May you know the liferay portal framework, which uses jQuery.)

I'll try to figure out as soon a possible which lib is interfering jQuery.

Changed November 11, 2008 12:36PM UTC by flesler comment:3

resolution: → invalid
status: newclosed