|Reported by:||godfreykfc||Owned by:||azaozz|
The new widget interface provides a very nice experience for the end-users, but not so much for the developers.
This ID change causes a lot of problem for other JS code. For instance, if you tab-ify your divs on document.ready using jQueryUI Tabs, it would no longer work after the stub widget is copied over to the sidebar, because the actions it uses are dependent on the actual IDs of the divs. You might think that adding an event listener for the onClick event on the expand button will solve the problem, but it won't work because WP already attached a listen to that event, which unfortunately returns "false" - which stops the event from bubbling up.
Currently, it requires a lot of hacking to get around this problem, (see: http://svn.wp-plugins.org/section-widget/trunk/section-widget.dev.js) so I am suggesting we should either: a) provide a way to register JS callbacks when a widget has been added to the sidebar, or b) trigger a custom event on the widget after it has been added to the sidebar.
Change History (5)
- Milestone Unassigned deleted
- Resolution set to wontfix
- Status changed from new to closed
- Version 2.8 deleted