mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-02 19:52:32 +02:00
Improve mentions example by including scroll calculation (#2883)
This commit is contained in:
committed by
Ian Storm Taylor
parent
7d4062cde9
commit
5222515c0c
@@ -100,8 +100,8 @@ class Suggestions extends React.PureComponent {
|
||||
const anchorRect = anchor.getBoundingClientRect()
|
||||
|
||||
this.setState({
|
||||
top: anchorRect.bottom,
|
||||
left: anchorRect.left,
|
||||
top: anchorRect.bottom + window.pageYOffset,
|
||||
left: anchorRect.left + window.pageXOffset,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user