Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
siecj opened this issue Dec 13, 2017 · 8 comments
Closed

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

siecj opened this issue Dec 13, 2017 · 8 comments

Comments

@siecj
Copy link

siecj commented Dec 13, 2017

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!

@DnJealt
Copy link

DnJealt commented Dec 13, 2017

Can you provide a jsfiddle?

@siecj
Copy link
Author

siecj commented Dec 15, 2017

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

@radiolips
Copy link
Member

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

@siecj
Copy link
Author

siecj commented Feb 22, 2018

@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.

@radiolips
Copy link
Member

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

radiolips added a commit to radiolips/gridstack.js that referenced this issue May 9, 2018
@radiolips
Copy link
Member

@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.

@michalcode8
Copy link

michalcode8 commented Sep 25, 2018

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 :(

@mishrarajesh
Copy link

It still does not work in 1.0.0-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants