I agree that return false proved to be the reverse of what most people
think it should be. And it does seem inconsistent with the rest of the
methods. I believe there are quite a few special events already
created though.

I say go ahead and fix the issues you've found with the add/remove
hooks. I'm going to be slammed on other things for Nokia the next
couple of weeks.

--
Brandon Aaron


On Sat, Jun 20, 2009 at 5:32 PM, Ariel Flesler<afles...@gmail.com> wrote:
>
> Hi
>
> There're a few things I'd like to mention about jQuery.event.special.
>
> About returning false to keep the native binding... While this has
> been around for a while already and it's painful to change stuff like
> this, I think it's really counter-intuitive.
> We sort of established returning false as a way to abort things
> (events, iterations). In this case, you need to return false not to
> abort the native binding.
>
> I can say that every time I used this (not that often) I expected
> return false to avoid regular binding. Considering this isn't used all
> that much, it wouldn't be THAT painful to change relatively.
>
>
> About the addition of add & remove, I gave a quick look at the code to
> see the arguments passed and noticed that if you pass multiple (space-
> separated) events to $.event.add and any of those overrides the
> handler, then the new handler will be used for the rest of the events.
> If more than one return a function, then you keep stacking functions
> (even worse).
>
> This should be fixed asap. I can open a ticket or even fix this
> myself, but I'd rather let Brandon handle it I suppose.
>
> One last small thing, I think:
> if ( modifiedHandler && jQuery.isFunction( modifiedHandler ) )
>
> Doesn't need to check if modifiedHandler is null, as jQuery.isFunction
> should handle null's. Of course you save a function call, but I don't
> think it's really critical and we rather keep shorter and clearer
> code.
>
> Cheers
> --
> Ariel Flesler
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to