Fix dragging in tab bar (#24998)

This commit is contained in:
Bram Kragten 2025-04-10 19:12:29 +02:00 committed by GitHub
parent 21b3177f95
commit 634db1944f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,6 +23,7 @@ export class HaSlTabGroup extends TabGroup {
public disconnectedCallback(): void {
super.disconnectedCallback();
window.removeEventListener("mousemove", this._mouseMove);
window.removeEventListener("mouseup", this._mouseUp);
}
override setAriaLabels() {
@ -44,7 +45,6 @@ export class HaSlTabGroup extends TabGroup {
if (scrollContainer) {
scrollContainer.addEventListener("mousedown", this._mouseDown);
scrollContainer.addEventListener("mouseup", this._mouseUp);
}
}
@ -73,6 +73,7 @@ export class HaSlTabGroup extends TabGroup {
this._scrolled = false;
window.addEventListener("mousemove", this._mouseMove);
window.addEventListener("mouseup", this._mouseUp, { once: true });
};
private _mouseUp = () => {