Make WordPress Core

Ticket #33367: 33367.patch

File 33367.patch, 557 bytes (added by tyxla, 9 years ago)

Prevent infinite scrolling while dragging an item in nav menu customizer

  • src/wp-admin/js/nav-menu.js

     
    619619                        // Use the right edge if RTL.
    620620                        menuEdge += api.isRTL ? api.menuList.width() : 0;
    621621
     622                        // Prevent infinite scrolling while dragging an item
     623                        api.menuList.on('scroll', function() {
     624                                $(this).scrollLeft(0);
     625                        });
     626
    622627                        api.menuList.sortable({
    623628                                handle: '.menu-item-handle',
    624629                                placeholder: 'sortable-placeholder',