[wp-trac] [WordPress Trac] #25594: When modifying your first menu, before saving, "Move" links do not work

WordPress Trac noreply at wordpress.org
Mon Oct 28 13:18:26 UTC 2013


#25594: When modifying your first menu, before saving, "Move" links do not work
--------------------------+------------------------------
 Reporter:  ericlewis     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Menus         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------
Changes (by ankit.gade@…):

 * cc: ankit.gade@… (added)
 * keywords:   => has-patch


Comment:

 In wp-admin/js/nav-menu.js file the events are attached to the element on
 "onclick" event. So evets are attched to the element when the page gets
 loaded, but not to the elements which are getting added to the document
 dynamically. So appropriate selector should be there, So instead of adding
 $("#element").on('click', function(){}) it should be $('body').on('click',
 "#element" function(){}). By doing this change it will work for all the
 targeted elements which are present or getting added dynamically after the
 page load.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25594#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list