UI: Avoid reselecting on page up at top.

This commit is contained in:
Unknown W. Brackets 2021-08-08 15:23:12 -07:00
parent 700a7baa9b
commit b43069109b

View file

@ -980,7 +980,11 @@ NeighborResult ScrollView::FindScrollNeighbor(View *view, const Point &target, F
targetPos.x += mult * bounds_.x;
// Okay, which subview is closest to that?
return vg->FindScrollNeighbor(view, targetPos, direction, best);
best = vg->FindScrollNeighbor(view, targetPos, direction, best);
// Avoid reselecting the same view.
if (best.view == view)
best.view = nullptr;
return best;
}
}