Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #28847

    kaliraw
    Participant

    Hi,
    the Drag and Drop don’t work correctly, from backend it is impossible to move the files correctly because it seems to be a css problem.

    Please check and correct soon!

    Good job!

    Thx

    #28849

    kaliraw
    Participant

    !UPDATA!

    By disabling the Advanced Custom Fields plugin, drag and drop continues to work

    #28871

    Bartosz
    Keymaster

    Does this happen with Gutenberg enabled?

    #28933

    markus.olsson
    Participant

    The error occurs without Gutenberg, it works when Advanced Custom Fields Pro is disabled.

    #29491

    shazzy
    Participant

    Hey everyone, I have found a workaround while this is hopefully officially getting fixed.

    First make sure you have way a to inject css and javascript into the admin area. If you already have this set up, you can skip the following step:

    1. Create a admin.css and admin.js file within your theme and enqueue it through your functions.php like so:

    function my_admin_theme_style_and_script() {
    	wp_enqueue_style('my-admin-style', get_template_directory_uri() . '/admin.css', false, '1.0');
    	wp_enqueue_script( 'my-admin-script', get_template_directory_uri() . '/admin.js', false, '1.0' );
    }
    add_action('admin_enqueue_scripts', 'my_admin_theme_style_and_script');

    2. In your admin.css add the following lines:

    #download-attachments .ui-sortable > tr.ui-sortable-placeholder {
    	height: 54px;
    	display: block;
    }

    3. in your admin.js add the following lines:

    jQuery(document).ready(function( $ ) {
    
        if($("#download-attachments").length){
            $( '#da-files tbody' ).sortable( "option", { 
    		stop: function ( e, ui ) {
    			$(ui.item).attr("style","");  
    			$( '#da-add-new-file input' ).prop( 'disabled', false );
    			$( 'p.da-save-files input' ).prop( 'disabled', false );
    		}
    	} );
        }
        
    });

    That should do the trick! If you have a lot of custom meta fields, you might want to wrap this in a timeout function.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.