Support

Account

Home Forums ACF PRO ACF PRO Select delete last selected value Reply To: ACF PRO Select delete last selected value

  • Ok i have some news.
    Autor of this plugin uses code:

    $("#e15").select2("container").find("ul.select2-choices").sortable({
        containment: 'parent',
            start: function() { 
                $("#e15").select2("onSortStart"); 
            },
            update: function() {
                $("#e15").select2("onSortEnd"); 
            }
        });

    I look into code of this plugin. Method onSotrStart hide search field, and onSortEnd show it. Then I read something on jQuery UI page: api.jqueryui.com/sortable/#event-update


    “update event: This event is triggered when the user stopped sorting and the DOM position has changed.”

    This is true, but only when we mix values (tags). When we place tag on search field or move tag sligly to the side, DOM does not change. That’s why instead of use update event you should use stop event.
    http://api.jqueryui.com/sortable/#event-stop

    stop: function() {
         $("#e15").select2("onSortEnd"); 
    }

    I check and its work very well 🙂