Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
fixes #304, kudos to @andpor (#2197)
Browse files Browse the repository at this point in the history
Summary:
Should fix #304.
Thanks andpor.

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

Reviewed By: elboman

Differential Revision: D18314441

Pulled By: mrkev

fbshipit-source-id: 99284101bab838c574341b44b3cfcd935f1dc0e2
  • Loading branch information
crowicked authored and facebook-github-bot committed Nov 5, 2019
1 parent c42662e commit 2908035
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 2908035

Please sign in to comment.