This project is archived and is in readonly mode.

#460 ✓invalid

cloneEvents events not bound to basic functions

Reported by Alan | November 6th, 2008 @ 10:29 AM

I'm sorry if the title doesn't explain well what's the problem.

Adding an event to a form with a text input, and cloning the whole thing (events included, for the form and each element) will result in a cloned form with events, but containing elements with events not bound to basic element actions (e.g. focus() not bound to element.fireEvent('focus')).

Here's an example

Is that normal? Is is a bug? If it's not, how can I overcome it?


Comments and changes to this ticket

  • Alan

    Alan November 7th, 2008 @ 03:59 PM

    Maybe the developers know already what might be stopping the events to be bound to the basic functions?


  • Jollino

    Jollino November 14th, 2008 @ 11:08 AM

    Hello, I have encountered the same behavior myself.

    Does anyone know whether this is the intended behavior of the cloneEvents() function? Should it be -- as I would expect -- a bug, is there any chance that it will be fixed for inclusion in 1.2.x, before the release of milestone 1.3.0?

    Thank you very much and kee up the great work!

  • fakedarren

    fakedarren February 8th, 2010 @ 04:31 PM

    • State changed from “new” to “invalid”
    • Assigned user cleared.
    • Milestone cleared.

    Hey guys

    Sorry it's taken so long to get back to you. First off this is 'expected' behaviour. We don't go through all innerHTML and check if those elements have events bound, cloning the events if they exist.

    Once we get full event delegation support (in 2.0) you will be able to delegate the events to the form element - until then there's no best 'right' to do it.

    Highly unlikely given the age of the ticket - but if you still need help with this post in our Google Group or jump into the IRC chatroom and we'll try and help you.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket