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.
This commit is contained in:
parent
818061d53b
commit
495f264ad5
1 changed files with 0 additions and 11 deletions
|
@ -102,10 +102,6 @@ export default class AutoHideScrollbar extends React.Component {
|
||||||
installBodyClassesIfNeeded();
|
installBodyClassesIfNeeded();
|
||||||
this._needsOverflowListener =
|
this._needsOverflowListener =
|
||||||
document.body.classList.contains("mx_scrollbar_nooverlay");
|
document.body.classList.contains("mx_scrollbar_nooverlay");
|
||||||
if (this._needsOverflowListener) {
|
|
||||||
this.containerRef.addEventListener("overflow", this.onOverflow);
|
|
||||||
this.containerRef.addEventListener("underflow", this.onUnderflow);
|
|
||||||
}
|
|
||||||
this.checkOverflow();
|
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() {
|
render() {
|
||||||
return (<div
|
return (<div
|
||||||
ref={this._collectContainerRef}
|
ref={this._collectContainerRef}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue