[Seaside-dev] Re: broken SU

Nick Ager nick.ager at gmail.com
Wed May 26 01:53:09 UTC 2010


I investigated this with Julian. Apologies for reiterating some of the
ground already covered:

SUAllComponentTests class>>initialize
..... preferenceAt: #scriptGeneratorClass put: *PTScriptGenerator*

with a PTScriptGenerator anchors which contain an href and onclick handlers
AND use  "return false" in onClick to stop the href link from firing do not
work as expected - The href link is activated. This is causing at least
SUAccordion and SUCarousel to break in the current trunk. The problem can be
fixed by replacing "return false" with "event.stop()".

(WADispatcher default handlerAt: 'javascript/scriptaculous-components')
 preferenceAt: #scriptGeneratorClass put: nil
results in working SUAccordion and SUCarousel without code changes.

(WADispatcher default handlerAt: 'javascript/scriptaculous-components')
 preferenceAt: #scriptGeneratorClass put: nil
and using the "event.stop()" code change also works.

a potential problem arises for users, with existing Scriptaculous code that
use say SUUpdater in an onclick handler on an anchor with an href. When they
update to the latest code alls well provided they don't start using
PTScriptGenerator, in which case they have to change their "return false" to
"event.stop()"

thoughts?

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20100526/00f807b9/attachment.htm


More information about the seaside-dev mailing list