提交 dfaff021 编写于 作者: R Rob Lourens

Let ListWidget's reveal take no action if the revealed element is already overflowing the viewport

Fix #78237
上级 a9640d05
......@@ -1533,7 +1533,9 @@ export class List<T> implements ISpliceable<T>, IDisposable {
const viewItemBottom = elementTop + elementHeight;
const wrapperBottom = scrollTop + this.view.renderHeight;
if (elementTop < scrollTop) {
if (elementTop < scrollTop && viewItemBottom >= wrapperBottom) {
// The element is already overflowing the viewport, no-op
} else if (elementTop < scrollTop) {
this.view.setScrollTop(elementTop);
} else if (viewItemBottom >= wrapperBottom) {
this.view.setScrollTop(viewItemBottom - this.view.renderHeight);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册