Actions
Bug #11207
closedRegression in Wt 4.9.0: scrollVisibilityChanged() signal seems to be broken
Start date:
01/01/2023
Due date:
% Done:
100%
Estimated time:
Description
Hello,
I tried to upgrade my project to 4.9.0 but I hit this js error:
TypeError: o is not iterable
The corresponding unminified js code part is:
(function () {
Wt._p_.response(373291984);
Wt4_9_0.ScrollVisibility = function (e) {
const t = e.WT;
function i(e) {
return "hidden" !== e.style.visibility && "none" !== e.style.display && !e.classList.contains("out") && (!((e = e.parentNode) && !t.hasTag(e, "BODY")) || i(e));
}
let n = 0;
const o = {},
s = !1;
function c(e, n) {
if (!i(e)) return !1;
const o = t.widgetPageCoordinates(e),
s = o.x - document.body.scrollLeft - document.documentElement.scrollLeft,
c = o.y - document.body.scrollTop - document.documentElement.scrollTop,
r = t.windowSize(),
l = s,
d = e.offsetWidth,
a = c,
u = e.offsetHeight,
f = -n,
m = r.x + 2 * n,
v = -n,
b = r.y + 2 * n;
return l + d >= f && f + m >= l && a + u >= v && v + b >= a;
}
function r() {
for (const t of o) { // ---> TypeError: o is not iterable <-----
const i = c(o[t].el, o[t].margin);
if (i !== o[t].visible) {
o[t].visible = i;
e.emit(o[t].el, "scrollVisibilityChanged", i);
}
}
}
Is it known? I use scrollVisibilityChanged() with sentinel elements to implement several infinite loading pages contained in a WStackedWidget.
Maybe there is something badly done on my side?
Updated by Roel Standaert almost 2 years ago
- Status changed from New to InProgress
- Assignee set to Roel Standaert
- Target version set to 4.9.1
Updated by Roel Standaert almost 2 years ago
- Status changed from InProgress to Review
- Assignee changed from Roel Standaert to Korneel Dumon
Updated by Roel Standaert almost 2 years ago
- Status changed from Review to Implemented @Emweb
- Assignee changed from Marnik Roosen to Roel Standaert
- % Done changed from 0 to 100
Updated by Roel Standaert almost 2 years ago
- Status changed from Implemented @Emweb to Resolved
Updated by Roel Standaert almost 2 years ago
- Status changed from Resolved to Closed
Actions