broken SU

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

broken SU

Julian Fitzell-2
So I looked into the failing Scriptaculous code. The problem is that
we are now adding onclick handlers for scriptaculous AJAX calls using
the observe() function. Returning false from these handlers does not
prevent the anchor's normal action from executing. Instead of "return
false" you need "event.stop()".

So, how do we solve that? We don't want users to have to know how
Seaside is adding the event handler in order to know what code they
need to write. Where's the right place to put an abstraction for this
(and can it be shared between SU/JQ?). Do we define some variant of
#callback: that doesn't allow the normal action to take place? (or a
variant that takes a boolean - #callback:stop:?)

I think we need to fix this before releasing because a bunch of the
demos are just totally broken (at very least, we need to change all
the "return false" statements to use "event.stop()" but that's not
really a proper fix).

Julian
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: broken SU

Julian Fitzell-2
Or a method on JSObject called #stopHandling or something?

onClick: (html scriptaculous updater
  id: id;
  callback: [ ... ];
  stopHandling)

Not sure how it gets the context though - do JSObjects know the Document?

Julian

On Wed, May 26, 2010 at 12:35 AM, Julian Fitzell <[hidden email]> wrote:

> So I looked into the failing Scriptaculous code. The problem is that
> we are now adding onclick handlers for scriptaculous AJAX calls using
> the observe() function. Returning false from these handlers does not
> prevent the anchor's normal action from executing. Instead of "return
> false" you need "event.stop()".
>
> So, how do we solve that? We don't want users to have to know how
> Seaside is adding the event handler in order to know what code they
> need to write. Where's the right place to put an abstraction for this
> (and can it be shared between SU/JQ?). Do we define some variant of
> #callback: that doesn't allow the normal action to take place? (or a
> variant that takes a boolean - #callback:stop:?)
>
> I think we need to fix this before releasing because a bunch of the
> demos are just totally broken (at very least, we need to change all
> the "return false" statements to use "event.stop()" but that's not
> really a proper fix).
>
> Julian
>
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: broken SU

Nick
In reply to this post by Julian Fitzell-2
I investigated this with Julian. Apologies for reiterating some of the ground already covered:


_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev