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

Commit 2908035

Browse files
crowickedfacebook-github-bot
authored andcommitted
fixes #304, kudos to @andpor (#2197)
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
1 parent c42662e commit 2908035

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/component/contents/DraftEditorBlock.react.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ class DraftEditorBlock extends React.Component<Props> {
126126
'blockNode is not an HTMLElement',
127127
);
128128
const blockBottom = blockNode.offsetHeight + blockNode.offsetTop;
129-
const scrollBottom = scrollParent.offsetHeight + scrollPosition.y;
129+
const pOffset = scrollParent.offsetTop + scrollParent.offsetHeight;
130+
const scrollBottom = pOffset + scrollPosition.y;
131+
130132
scrollDelta = blockBottom - scrollBottom;
131133
if (scrollDelta > 0) {
132134
Scroll.setTop(

0 commit comments

Comments
 (0)