mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
Remove fairly redundant condition
Making sure that a node is intersected by the bottom of the wrapper is a bit overkill, given that we iterate from the bottom. This also prevents the scenario of having no nodes that are not precisely intersected, but possibly straddling the bottom of the wrapper.
This commit is contained in:
parent
47f29b9454
commit
423babdb17
1 changed files with 1 additions and 2 deletions
|
@ -599,8 +599,7 @@ module.exports = React.createClass({
|
|||
// as the scrollToken.
|
||||
// If this is false for the entire for-loop, we default to the last node
|
||||
// (which is why newScrollState is set on every iteration).
|
||||
if (boundingRect.top < wrapperRect.bottom &&
|
||||
wrapperRect.bottom < boundingRect.bottom) {
|
||||
if (boundingRect.top < wrapperRect.bottom) {
|
||||
// Use this node as the scrollToken
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue