question-mark
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.

Use body scroll instead of container scroll

See original GitHub issue

I would like to have the same behavior as this: http://developerdizzle.github.io/react-virtual-list/ (when Contained is not checked…). The list uses the scroll of the body instead of the virtual container.

I thought defining [parentScroll]=window would make it but I still get the scroll on my virtual-scroll container. Is it possible to achieve that or am I misunderstanding what parentScroll is?

PS body is obviously a parent of my virtual-scroll container but not its direct “father” - not sure if it could be an issue

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
robvaneckcommented, Jan 24, 2018

@natcohen have you solved this? and could you post your code example? Im having issues with this. Cause im seeing two scrollbars while using [parentScroll]=“scroll.window” https://ibb.co/n4ETKG

thank you!

0reactions
speigecommented, Jul 19, 2018

@natcohen Would you please submit a pull request for the support for table header & striped rows? I can merge & update npm. I think it’d benefit other developers using this component. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prevent body scrolling but allow overlay scrolling
I attempted to create this with just CSS (i.e. a div overlay on top of the whole page and body with overflow: hidden...
Read more >
How to prevent body scrolling but allow overlay scrolling in CSS
In this article, we are going to learn how we can prevent body scrolling but allow overlay scrolling. The objective is to add...
Read more >
Does <html> or <body> scroll the page? - makandra cards
HTML elements with overflow-y: auto or overflow-y: scroll will get a scrollbar when their content is higher than their own height. Illustration ...
Read more >
How to fight the <body> scroll. First of all - Medium
So — use overflow:hidden on body to kill the scroll on Desktop and Android browsers, and prevent events to mitigate Safari.
Read more >
Using CSS Overscroll-Behavior To Prevent Scrolling Of Parent ...
Ben Nadel demonstrates that the CSS property, overscroll-behavior, can be used to trap the mouse scroll wheel within an overflow container.
Read more >

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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found