mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Fix dragging in tab bar (#24998)
This commit is contained in:
parent
21b3177f95
commit
634db1944f
@ -23,6 +23,7 @@ export class HaSlTabGroup extends TabGroup {
|
|||||||
public disconnectedCallback(): void {
|
public disconnectedCallback(): void {
|
||||||
super.disconnectedCallback();
|
super.disconnectedCallback();
|
||||||
window.removeEventListener("mousemove", this._mouseMove);
|
window.removeEventListener("mousemove", this._mouseMove);
|
||||||
|
window.removeEventListener("mouseup", this._mouseUp);
|
||||||
}
|
}
|
||||||
|
|
||||||
override setAriaLabels() {
|
override setAriaLabels() {
|
||||||
@ -44,7 +45,6 @@ export class HaSlTabGroup extends TabGroup {
|
|||||||
|
|
||||||
if (scrollContainer) {
|
if (scrollContainer) {
|
||||||
scrollContainer.addEventListener("mousedown", this._mouseDown);
|
scrollContainer.addEventListener("mousedown", this._mouseDown);
|
||||||
scrollContainer.addEventListener("mouseup", this._mouseUp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,6 +73,7 @@ export class HaSlTabGroup extends TabGroup {
|
|||||||
this._scrolled = false;
|
this._scrolled = false;
|
||||||
|
|
||||||
window.addEventListener("mousemove", this._mouseMove);
|
window.addEventListener("mousemove", this._mouseMove);
|
||||||
|
window.addEventListener("mouseup", this._mouseUp, { once: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
private _mouseUp = () => {
|
private _mouseUp = () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user