Support

Account

Home Forums Bug Reports Drag and drop in gallery field extremely hard to use

Solving

Drag and drop in gallery field extremely hard to use

  • Using the latest version of ACF Pro, though probably applies to all versions.

    There are two issues with the drag and drop functionality in the gallery field which make it almost impossible to use. Consider this collection of logos:

    I move my mouse to the ‘Sandia National Laboratories’ logo, click, and start dragging. The following happens (location of mouse cursor added):

    The logo I’m dragging appears a long way from the cursor (and continues to stay at that offset). Somehow a scrollbar has appeared, which means less room for the logos, which means the placeholder doesn’t fit where it used to, which means the logos wrap onto a third row, which means a scrollbar appears. I’m not sure where that circle of logic starts, but there’s a bug there somewhere!

    Secondly, I want to drag the GE logo over a couple of spots. Mouse cursor shows where I’m dragging it to:

    But it hasn’t allowed me to – it only updates the position if my mouse cursor is higher, exactly over the very short image that is sitting in that position. When small images are involved, this is very awkward (and it took me a while to figure out that was why it wouldn’t drop in position). Ideally, the ‘droppable’ area should expand in height to match the largest image in that row.

  • It’s not the appearance of the scroll bar doing it. The containing div has a padding on which is somehow affecting the width of the placeholder div that’s put in place when you start dragging one of the images, honestly I’m not sure why.

    I will mark this topic for the developer to look at when he has time.

    In the meantime, adding this to functions php will fix the issue

    
    
      add_action('admin_head', 'correct_acf_gallery_drag');
      function correct_acf_gallery_drag() {
        ?>
          <style>
            .acf-gallery-attachments {
              padding: 0;
            }
          </style>
        <?php 
      }
    
    
  • That doesn’t seem to have helped I’m afraid. Seems dragging any item causes something to shift onto the next row.

  • It’s because of the way:

    .acf-gallery-attachment:nth-child(5n+1)

    is set to clear:left – when I start dragging, an extra element gets added, so the wrong one gets cleared.

  • I’m not sure exactly what’s going on. I’ve marked this for the developer’s attention but I can’t say when he’ll see it. If you want quicker attention then you should submit support ticket here http://support.advancedcustomfields.com/new-ticket/.

  • Thanks, have done so.

  • It’s been a while but I never heard anything back from the support ticket. Every time I want a group of images I’m having to use a repeater field since drag and drop in the gallery is broken – any chance in bumping this up the priority list?

  • I’ve marked this thread as a bug, which is really as far as I can go. I’m not part of the support staff, so I can’t tell you where that stands.

  • So does nobody actually use the gallery field in reality? This major bug makes it far too hard for any of our clients to use, so I have to avoid it and use a repeater field every time..

  • I have reported this to the developer.

  • Hi guys

    Thanks for your help bringing this bug to light.

    I’ve done some work improving the gallery field.
    Please login to your account online and click the ‘see all versions’ link next to your license. This will allow you to see and download version 5.4.0 beta3. http://www.advancedcustomfields.com/my-account

    I have been able to completely fix this drag/drop float/clear issue by improving the UI. I have removed the ‘preview_size’ setting and rendered the UI more similar to how WP does in it’s media library.

    I’ve wanted to do this for a while and am happy with the results.
    What do you think?

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Drag and drop in gallery field extremely hard to use’ is closed to new replies.