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

Freezes window scroll on touch #51

Open
adsteel opened this issue Nov 17, 2015 · 7 comments
Open

Freezes window scroll on touch #51

adsteel opened this issue Nov 17, 2015 · 7 comments
Labels

Comments

@adsteel
Copy link

adsteel commented Nov 17, 2015

I am unable to window scroll when dragging on the list on a touch screen. The window scroll event is swallowed and all I can do is reorder. If I move the list to a div that scrolls, it works fine.

@JakeSidSmith
Copy link
Owner

You shouldn't be able to scroll while dragging an item. Scrolling is implemented so that when you drag an item near the bottom / top of the list it'll scroll automatically.

Imagine you're trying to drag an item from the center of the list to the top. If scrolling was also allowed then you would end up scrolling down the page, and you'd never be able to place the item at the top.

Make sure the list container is scrollable & it should work fine. :)

@adsteel
Copy link
Author

adsteel commented Nov 17, 2015

@JakeSidSmith Thanks for the quick response! It does work fine in a list container. But I don't want to constrain it to a list container. I want to have a normal window, with a list that disappears off the page. I want to both be able to scroll the page to see the rest of this list (by touch/dragging the list), and to reorder the items. Does that make sense?

@JakeSidSmith
Copy link
Owner

Ahh, I think I see what you mean. Even while not dragging an item you cannot scroll past the reorderable list?

@adsteel
Copy link
Author

adsteel commented Nov 17, 2015

On a touch screen, I cannot scroll the page when I touch-drag on the list. The page scroll event seems to be swallowed. I can still scroll the page when I touch-drag elements outside of the list, and I can reorder the items I can see in the list.

@JakeSidSmith
Copy link
Owner

Kk. Well, this'll definitely need a fair bit of work. This component was designed to work like a native Android / iOS listview, and they don't tend to have other scrollable content around them.

I'll have a quick look now. :)

@adsteel
Copy link
Author

adsteel commented Nov 17, 2015

Thanks!

You can see this in your demo if you:

  1. disable the overflow:auto on the container div (or remove the list from any otherwise constrained container div)
  2. create enough list items that they disappear off the end of the page
  3. use the chrome iPad emulator to try to scroll.

@JakeSidSmith
Copy link
Owner

I've stayed up way too late working on this, but I'm very close to a breakthrough. Will hopefully have the solution tomorrow. Gonna sleep on it. :)

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

No branches or pull requests

2 participants