[wp-trac] [WordPress Trac] #38948: More difficult to create submenus in customizer

WordPress Trac noreply at wordpress.org
Tue Nov 29 11:28:19 UTC 2016


#38948: More difficult to create submenus in customizer
-----------------------------+-------------------------
 Reporter:  adamsilverstein  |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  4.7
Component:  Customize        |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:  javascript
-----------------------------+-------------------------
Changes (by delawski):

 * keywords:  needs-patch => has-patch
 * focuses:   => javascript


Comment:

 Thank you @adamsilverstein for investigating the issue. It helped me a lot
 to find out what was wrong and create
 [https://core.trac.wordpress.org/attachment/ticket/38948/38948_1.diff a
 fix]. You can also review it [https://github.com/xwp/wordpress-
 develop/pull/209 on the GitHub].

 So the issue was that the `initSortables()` has been called before the nav
 menu section was actually expanded. Because of that incorrect
 `offset().left` value has been calculated (as noted by @adamsilverstein:
 instead of `0` it returned `299`).

 The `initSortables()` method call has been bound to the `expandedSection`
 event, so that the calculation is done after the section is fully
 expanded. It fixed the issue on my end.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38948#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list