Skip to content

Commit ced4039

Browse files
committed
refactored comment
1 parent 36d72b7 commit ced4039

File tree

1 file changed

+1
-3
lines changed
  • src/components/HTMLEngineProvider/HTMLRenderers/PreRenderer

1 file changed

+1
-3
lines changed

src/components/HTMLEngineProvider/HTMLRenderers/PreRenderer/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ class PreRenderer extends React.Component {
3131
const node = this.ref.getScrollableNode();
3232
const horizontalOverflow = node.scrollWidth > node.offsetWidth;
3333

34-
/* Scrolling horizontally with two fingers on the touchpads,
35-
the fingers may go up a little during that scroll, and the page will
36-
start to scroll vertically. We eliminate this bug by checking the large delta. */
34+
// Account for vertical scrolling variation when horizontally scrolling via touchpad by checking a large delta.
3735
const isVerticalScrolling = Math.abs(event.deltaY) > 3; // This is for touchpads sensitive
3836
if ((event.currentTarget === node) && horizontalOverflow && !isVerticalScrolling) {
3937
node.scrollLeft += event.deltaX;

0 commit comments

Comments
 (0)