diff --git a/scripts/system/html/js/entityList.js b/scripts/system/html/js/entityList.js
index 00c50169a6..39673b8f16 100644
--- a/scripts/system/html/js/entityList.js
+++ b/scripts/system/html/js/entityList.js
@@ -1219,7 +1219,7 @@ function loaded() {
refreshSortOrder();
refreshEntities();
- window.onresize = updateColumnWidths;
+ window.addEventListener("resize", updateColumnWidths);
});
augmentSpinButtons();
diff --git a/scripts/system/html/js/listView.js b/scripts/system/html/js/listView.js
index 07aba53f1c..f775a4cb24 100644
--- a/scripts/system/html/js/listView.js
+++ b/scripts/system/html/js/listView.js
@@ -72,11 +72,6 @@ ListView.prototype = {
}
},
- onScroll: function() {
- var that = this.listView;
- that.scroll();
- },
-
scroll: function() {
let scrollTop = this.elTableScroll.scrollTop;
let scrollHeight = this.getScrollHeight();
@@ -244,18 +239,13 @@ ListView.prototype = {
}
},
- onResize: function() {
- var that = this.listView;
- that.resize();
- },
-
resize: function() {
if (!this.elTableBody || !this.elTableScroll) {
debugPrint("ListView.resize - no valid table body or table scroll element");
return;
}
- let prevScrollTop = this.elTableScroll.scrollTop;
+ let prevScrollTop = this.elTableScroll.scrollTop;
// take up available window space
this.elTableScroll.style.height = window.innerHeight - WINDOW_NONVARIABLE_HEIGHT;
@@ -305,10 +295,10 @@ ListView.prototype = {
this.elTableBody.appendChild(this.elBottomBuffer);
this.elBottomBuffer.setAttribute("height", 0);
- this.elTableScroll.listView = this;
- this.elTableScroll.onscroll = this.onScroll;
- window.listView = this;
- window.onresize = this.onResize;
+ this.onScroll = this.scroll.bind(this);
+ this.elTableScroll.addEventListener("scroll", this.onScroll);
+ this.onResize = this.resize.bind(this);
+ window.addEventListener("resize", this.onResize);
// initialize all row elements
this.resize();