gridstack.js icon indicating copy to clipboard operation
gridstack.js copied to clipboard

auto scroll doesn't work when inside a container with scroll bar

Open siecj opened this issue 8 years ago • 8 comments

Subject of the issue

I'm trying to let the grid stack auto scroll the container (not browser body but a DIV with scroll bar) and it doesn't work. I already set the draggable: { scroll: true }.

Your environment

  • v0.2.6; v0.3.0

Steps to reproduce

I directly modified on the demo/float.html by adding the following part.

  1. Change the grid stack option like below and the auto scroll worked when there is browser scroll bar. image
  2. After put the grid stack element inside a DIV, the auto scroll doesn't work anymore. image image

Expected Behavior

The auto scroll should work inside the DIV.

Thanks a lot!

siecj avatar Dec 13 '17 08:12 siecj

Can you provide a jsfiddle?

DnJealt avatar Dec 13 '17 08:12 DnJealt

@DnJealt Here is a demo in Plunker: https://embed.plnkr.co/fTujnLQlpPVibNezqouU/ Please add enough widget in grid stack to reproduce the issue. image

siecj avatar Dec 15 '17 02:12 siecj

@siecj What am I looking at here? You want the div to scroll down? If so, can't you use a line of Javascript?

radiolips avatar Feb 12 '18 15:02 radiolips

@radiolips What I want is auto scroll down when drugging the widget to the bottom of the div. GridStack already have the options "draggable" - "scroll", but it is only working when using browser's scroll bar.

siecj avatar Feb 22 '18 02:02 siecj

@siecj This will be available, at least in the develop branch, by the end of the week.

radiolips avatar May 01 '18 18:05 radiolips

@siecj Could you try the dev branch? A feature rolled out yesterday that may fix this for you. I'm closing this, but please let me know if it works for you now.

radiolips avatar May 10 '18 13:05 radiolips

Hi @radiolips , this does not seems to work https://embed.plnkr.co/fTujnLQlpPVibNezqouU/ when i change gridstack linkto version 0.4.0 it still does not scroll on portlet drag :(

michalcode8 avatar Sep 25 '18 13:09 michalcode8

It still does not work in 1.0.0-dev

mishrarajesh avatar Sep 10 '19 09:09 mishrarajesh