• I’m working on a widget that will display a slideshow and want to allow the user to choose the number of photos to display in the widget. To add an image to the show, I’ve included an Add Image button and used jQuery to set the onclick handler.

    The problem is that the script element created by the widget’s form function is not initially copied to a newly created widget. Using Chrome’s developer tools, it’s just not there. As soon as I save the widget, though, the script is included with the widget and everything works fine.

    I’m already working on a workaround that uses function calls instead of dynamically creating the function when the new widget is added, but I’m wondering if this issue shouldn’t be submitted as a bug. It seems that the Widget Admin panel _should_ be copying the script element into the new widget but just isn’t.

    What do you think? Am I missing something, or is this a bug?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Javascript element not (initially) copied to new widget form’ is closed to new replies.