Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Workaround solution for ‘useWindowAsScrollContainer’ not scrolling in ie/chrome/firefox

See original GitHub issue

Come across a problem that using ‘useWindowAsScrollContainer’ property, the window won’t scroll when an element dragged to the border of the browser, #58.

It seems that current version v0.6.8 still not fix this problem (maybe it is a feature?).

So, I make a workaround solution:

handleMove(e) {
    if (window.innerHeight - event.clientY < 50) {
       window.scrollBy(0, 10)} // you can use throttle here
    } else if (event.clientY < 50) {
       window.scrollBy(0, -10)

and bind handleMove to onSortMove property.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

ThanosDicommented, Oct 19, 2017

While this indeed scroll the window it has the same effect as moving the wheel mouse while dragging an element. The element “placeholders” are relative to the height while starting dragging and not to the current height of the window. I attached a gif for better demonstration. scroll window

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found