Merge pull request #6670 from matrix-org/palid/fix/difficult-to-grab-scrollbar

Fix resizer for detaching
This commit is contained in:
Dariusz Niemczyk 2021-08-24 18:28:09 +02:00 committed by GitHub
commit 4d7b6f3c4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,7 +84,7 @@ export default class Resizer<C extends IConfig = IConfig> {
} }
public detach() { public detach() {
const attachment = this?.config?.handler.parentElement ?? this.container; const attachment = this?.config?.handler?.parentElement ?? this.container;
attachment.removeEventListener("mousedown", this.onMouseDown, false); attachment.removeEventListener("mousedown", this.onMouseDown, false);
window.removeEventListener("resize", this.onResize); window.removeEventListener("resize", this.onResize);
} }