From 495f264ad583d4eaa7791a8ddd7ee9f654476f0d Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 29 Jan 2019 16:20:39 +0100 Subject: [PATCH] prevent badge jumping when hovering over sublist this was caused by the layout growing wider than it could, hence the overflow event being triggered. The overflow event is only supported in FF and we fire the manual check often enough that the overflow gradient still reliably (dis)appears when needed. --- src/components/structures/AutoHideScrollbar.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/components/structures/AutoHideScrollbar.js b/src/components/structures/AutoHideScrollbar.js index a8fccec08e..a385df0401 100644 --- a/src/components/structures/AutoHideScrollbar.js +++ b/src/components/structures/AutoHideScrollbar.js @@ -102,10 +102,6 @@ export default class AutoHideScrollbar extends React.Component { installBodyClassesIfNeeded(); this._needsOverflowListener = document.body.classList.contains("mx_scrollbar_nooverlay"); - if (this._needsOverflowListener) { - this.containerRef.addEventListener("overflow", this.onOverflow); - this.containerRef.addEventListener("underflow", this.onUnderflow); - } this.checkOverflow(); } @@ -118,13 +114,6 @@ export default class AutoHideScrollbar extends React.Component { } } - componentWillUnmount() { - if (this._needsOverflowListener && this.containerRef) { - this.containerRef.removeEventListener("overflow", this.onOverflow); - this.containerRef.removeEventListener("underflow", this.onUnderflow); - } - } - render() { return (