Project

General

Profile

Bug #7361 » 0001-Fix-intermittent-scrollTo-failures-in-WTableView.patch

Bruce Toll, 12/10/2019 03:04 AM

View differences:

src/js/WTableView.js
var scrollToPendingCount = 0;
var initialScrollTopSet = initialScrollTop === 0;
var ignoreScrollEvent = false;
/*
* We need to remember this for when going through a hide()
* show() cycle.
......
Math.round(contentsContainer.clientWidth),
Math.round(contentsContainer.clientHeight));
}
}
};
headerContainer.onscroll = function(obj, event) {
if (ignoreScrollEvent) {
ignoreScrollEvent = false;
} else {
ignoreScrollEvent = true;
if (scrollLeft !== headerContainer.scrollLeft) {
scrollLeft = contentsContainer.scrollLeft = headerContainer.scrollLeft;
maybeEmitScrolled();
}
};
this.onContentsContainerScroll = function() {
if (ignoreScrollEvent) {
ignoreScrollEvent = false;
} else {
ignoreScrollEvent = true;
if ((scrollLeft !== contentsContainer.scrollLeft) ||
(scrollTop !== contentsContainer.scrollTop)) {
scrollLeft = headerContainer.scrollLeft
= contentsContainer.scrollLeft;
scrollTop = headerColumnsContainer.scrollTop
(3-3/3)