I've pulled your changes, and updated the onsubmit delegation stuff to
use custom event object passing rather than data object hacking (as
well as a bunch of other tweaks).
> I also found a strange bug, that when I have 2 specs that are testing
> form.submit, and have concrete handlers bound to that return false to
> stop the propogation, the second spec does not stop it and I need to
> have an additional
>
> $('form').submit(function () { return false;})
>
> to not make it submit.
There were a couple of issues:
You were attaching the forms to body, rather than #dom_test, so the
forms weren't getting removed between tests
I wasn't unbinding the event handlers on $.concrete.clear_all_rules,
so old submission handlers were getting triggered
These both should be fixed. I've also made all the spec forms have
action="javascript:undefined" so that even if there is a bug in the
event handling code, we won't get that annoying continual-refresh bug.
> I still don't have a complete understanding of jquery events, and
> concrete's event handling, but it looks like concrete's handling is
> reimplementing some of the jquery event handlers, and maybe by
> building a custom event object that knows about concrete's delegation
> we could avoid that?
Concrete does sort of duplicate jQuery live, but unfortunately their
call semantics are too different to let me wrap live - I tried, and it
just resulted in lots of weird bugs.
By itself jQuery live doesn't handle onsubmit or onchange or
mouseenter / leave or any of the other events that concrete needs
custom handlers for anyway, which is the bulk of the code.
Hamish Friedlander