skip to Main Content

I have a list with about twenty items, and I use JqueryUI sortable to sort them by drag and drop functionality,
It works well on IE an Firefox but on Chrome when drag it up, the page scroll reversely and goes down,
I use Twitter Bootstrap for styling.
I was wondering if any body had a similar issue
My code is as below:

<script>
    $(function () {
        $("#sortable").sortable({
            update: function (event, ui) {
            }});
        $("#sortable").disableSelection();

    });
</script>

and my list uses ul and li tags

2

Answers


  1. I had a similar problem where the page was scrolling to the bottom in Chrome when I tried dragging a sortable item.
    The fix I found was to add the scroll: false option, like this:

    $( ".sortable" ).sortable({
               scroll: false
    }); 
    

    The answer here gave me the solution.

    Login or Signup to reply.
  2. I have had the same problem! I went through my css disabling different styles until I found what caused it. In my case I had set overflow-y: scroll; on my <body> tag. Moving it to the <html> tag solved my problem, unfortunately that caused the problem in Firefox instead..

    In the end I removed the overflow property altogether. It wasn’t so important to me.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search