Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7988093

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:20:07+00:00 2026-06-04T12:20:07+00:00

I have two lists of elements, and I have enabled jQuery UI sortable on

  • 0

I have two lists of elements, and I have enabled jQuery UI sortable on both of them. I used the connectWith option to enable me to drag between the two lists.

One list has a lot of elements in it, so I added overflow-y: scroll to it. I used a custom helper function to allow me to scroll the entire page when dragging elements.

helper: function(event, element){
    // From: http://stackoverflow.com/a/8512783/206403
    return element.clone().appendTo('body');
}

If there are no elements in the top list, it’s really hard to drag an element into it. If there is already an element in the top list it works fine.

Here’s a demo: http://jsfiddle.net/MCcuc/5/. Scroll down, and try to move “Item Q” (from the bottom of the red list), to the green list (try to move the element over the green list, then back out again). You’ll see that it’s not very easy to get it to attach to the green list.

I think it has something do to with my helper function. How can I get it to let me drag the first element into the green list?

  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:20:10+00:00Added an answer on June 4, 2026 at 12:20 pm

    I am not sure that it helps but what I found is that the “real” problem starts earlier and not at the point when the placeholder disappears. What happens is that the inner scroll-bar doesn’t scroll, but in the background the position of your cursor still triggers reordering in the Inactive list. So visually your item is above the Active list, but its position is still above the first 2 elements of the Inactive list. However because of the visual “over” placement the placeholder is already in the Active list. So when the position leaves the “virtual position” of the first item of the Inactive list then the placeholder is removed. Unfortunately by this time it’s in the Active list not in the inactive list.

    So what I meant by “the problem starts earlier” is that the placeholder should stay in the Inactive list and make it scroll up instead of being moved to the Active list too early, which is probably what you want: first use the scroll-bar of the list then use the scroll-bar of the body. But this implies the requirement of the moving helper item being the child element of the old list when it’s above it and become the child of the ‘body’ when it leaves the old list’s area.

    I don’t think you can do that (with this plugin).

    What might be possible: if you don’t want to rearrange within the Inactive list but only move items to the Active list with page scroll. In this case what you could do for example is to use the ‘out’ event and when it’s triggered scroll up the Inactive list. Unfortunately seems the ‘out’ event is not triggered the very first time when it should be.
    Seems like a bug 🙁

    ...
    appendTo: 'body',
    helper: 'clone',
    out: function() {$('#Inactive')[0].scrollTop = 0;},
    ...
    

    Update: found a workaround. I am not polishing it (special case: when the placeholder is the first item in the list), but this is the idea:

    appendTo: 'body',
    helper: 'clone',
    placeholder: 'addBox',
    change: function() {
        $('.addBox').prev()[0].scrollIntoView();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two lists of elements, and I have enabled jQuery UI sortable on
I have two Lists that both are drag-drop enabled. I also draw a chart
I have two lists and one of them has 5 elements and the other
We have two lists: a=['1','2','3','4'] b=['2','3','4','5'] How to get a list with elements that
I have two integer lists ( List<int> ). They contain the same elements, but
I have two lists old and new , with the same number of elements.
I have two sortable lists, one being nested, with a mouse over effect on
If I have two parallel lists and want to sort them by the order
I have two lists with 8 list elements within each one. I would like
I have two lists. At start only the first one has visible elements, the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.