Nav menus: Better JS performance on initial load of edit screen.
The accessibility helpers previously processed all items when editing a menu, which was quite slow to the point of being unresponsive for large menus. They now only process items when they are expanded or a user comes near them in some way, such as hover or focus. Also simplifies a redundant set of click event handlers down to one, which further enhances performance. props atimmer, sevenspark. fixes #25698. Built from https://develop.svn.wordpress.org/trunk@31604 git-svn-id: http://core.svn.wordpress.org/trunk@31585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -186,11 +186,11 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
|
||||
<p class="field-move hide-if-no-js description description-wide">
|
||||
<label>
|
||||
<span><?php _e( 'Move' ); ?></span>
|
||||
<a href="#" class="menus-move-up"><?php _e( 'Up one' ); ?></a>
|
||||
<a href="#" class="menus-move-down"><?php _e( 'Down one' ); ?></a>
|
||||
<a href="#" class="menus-move-left"></a>
|
||||
<a href="#" class="menus-move-right"></a>
|
||||
<a href="#" class="menus-move-top"><?php _e( 'To the top' ); ?></a>
|
||||
<a href="#" class="menus-move menus-move-up" data-dir="up"><?php _e( 'Up one' ); ?></a>
|
||||
<a href="#" class="menus-move menus-move-down" data-dir="down"><?php _e( 'Down one' ); ?></a>
|
||||
<a href="#" class="menus-move menus-move-left" data-dir="left"></a>
|
||||
<a href="#" class="menus-move menus-move-right" data-dir="right"></a>
|
||||
<a href="#" class="menus-move menus-move-top" data-dir="top"><?php _e( 'To the top' ); ?></a>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user