Support

Account

Forum Replies Created

  • I’ve been reported with same issue. We are also using Yoast SEO, but disabling did not help.
    So I decided to update acf-input.js code… I replaced this original code:

    // sortable
                    $ul.sortable({
                        stop: function( e ) {
    
                            // loop
                            $ul.find('.select2-selection__choice').each(function() {
    
                                // vars
                                var $option = $( $(this).data('data').element );
    
                                // detach and re-append to end
                                $option.detach().appendTo( $select );
                            });
    
                            // trigger change on input (JS error if trigger on select)
                            $select.trigger('change');
                        }
                    });

    with this code:

    // sortable
    				$ul.sortable({
    		            stop: function( e ) {
    		            	// get select2 selection
    			            let data = $select.select2('data');
    			            // loop
    			            $ul.find('.select2-selection__choice').each(function() {
    			            	// get current element from data
    				            let data_element = data.filter(item => item.text === $(this).attr('title'));
    				            // vars
    							var $option = $( data_element[0].element );
    
    							// detach and re-append to end
    							$option.detach().appendTo( $select );
    		                });
    
    		                // trigger change on input (JS error if trigger on select)
    	                    $select.trigger('change');
    		            }
    				});
Viewing 1 post (of 1 total)

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.