Merge pull request #3858 from tylershuster/chrome-scroll

chat: fixes #3853
This commit is contained in:
matildepark 2020-11-02 15:05:30 -05:00 committed by GitHub
commit d33ed266a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -245,7 +245,8 @@ export default class VirtualScroller extends PureComponent<VirtualScrollerProps,
event.preventDefault(); event.preventDefault();
const normalized = normalizeWheel(event); const normalized = normalizeWheel(event);
if ( if (
(event.target.scrollHeight > event.target.clientHeight && event.target.clientHeight > 0) // If we're scrolling something with a scrollbar !event.target.isSameNode(element)
&& (event.target.scrollHeight > event.target.clientHeight && event.target.clientHeight > 0) // If we're scrolling something with a scrollbar
&& ( && (
(event.target.scrollTop > 0 && event.deltaY < 0) // Either we're not at the top and scrolling up (event.target.scrollTop > 0 && event.deltaY < 0) // Either we're not at the top and scrolling up
|| (event.target.scrollTop < event.target.scrollHeight - event.target.clientHeight && event.deltaY > 0) // Or we're not at the bottom and scrolling down || (event.target.scrollTop < event.target.scrollHeight - event.target.clientHeight && event.deltaY > 0) // Or we're not at the bottom and scrolling down