Revert "chat: fixed embedded scroll item disability"

This reverts commit 3b5d3c6ff6.
This commit is contained in:
Matilde Park 2020-11-17 17:58:36 -05:00
parent 5399d76052
commit 46fc5b5e4f

View File

@ -245,18 +245,7 @@ export default class VirtualScroller extends PureComponent<VirtualScrollerProps,
element.addEventListener('wheel', (event) => { element.addEventListener('wheel', (event) => {
event.preventDefault(); event.preventDefault();
const normalized = normalizeWheel(event); const normalized = normalizeWheel(event);
if (
!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 < event.target.scrollHeight - event.target.clientHeight && event.deltaY > 0) // Or we're not at the bottom and scrolling down
)
) {
event.target.scrollBy(0, normalized.pixelY);
} else {
element.scrollBy(0, normalized.pixelY * -1); element.scrollBy(0, normalized.pixelY * -1);
}
return false; return false;
}, { passive: false }); }, { passive: false });
window.addEventListener('keydown', this.invertedKeyHandler, { passive: false }); window.addEventListener('keydown', this.invertedKeyHandler, { passive: false });