Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event is overwritten when Element.attr() is called in a handler (Raphael) #7

Open
xzed opened this issue Jan 26, 2012 · 0 comments
Open

Comments

@xzed
Copy link

xzed commented Jan 26, 2012

I fire an Event with Eve:

eve("test.a");

if I have an Eve EventHandler in which Element.attr() is called:

eve.on("test.*",function(){
   console.log('#1',evt.nt());

   circle.attr('r',20);  // circle is defined somewhere else

   console.log('#2',evt.nt());
});

in the console:

 #1, "test.a"
 #2, "attr..."

the original Eventname is overwritten.

I found in the source code of Raphael, that when caling elproto.attr(),
a new Event is fired, which is the cause for this bug.

The problem is now, if you have a second EventHandler which also listens for "test.*",

and you want to elaborate inside which subname the Event has, you can't do this.

The original Problem may be in Eve..

if a Event is fired inside a Handler the original Event seems to be overwritten

I would be thankful for any respond / solution.

@xzed xzed closed this as completed Jan 26, 2012
@xzed xzed reopened this Jan 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant