Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Summary:
Should fix facebookarchive#304.
Thanks andpor.

**Summary**
based on Andrzej's facebookarchive#1223, issue has been there for an incredible 3.5 years. Let's fix this.
Pull Request resolved: facebookarchive#2197

Reviewed By: elboman

Differential Revision: D18314441

Pulled By: mrkev

fbshipit-source-id: 99284101bab838c574341b44b3cfcd935f1dc0e2
  • Loading branch information
crowicked authored and mmissey committed Mar 24, 2020
1 parent e2fe6b3 commit 01bc213
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/component/contents/DraftEditorBlock.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ class DraftEditorBlock extends React.Component<Props> {
'blockNode is not an HTMLElement',
);
const blockBottom = blockNode.offsetHeight + blockNode.offsetTop;
const scrollBottom = scrollParent.offsetHeight + scrollPosition.y;
const pOffset = scrollParent.offsetTop + scrollParent.offsetHeight;
const scrollBottom = pOffset + scrollPosition.y;

scrollDelta = blockBottom - scrollBottom;
if (scrollDelta > 0) {
Scroll.setTop(
Expand Down

0 comments on commit 01bc213

Please sign in to comment.