mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Fix tooltip scrolling (#23616)
This commit is contained in:
parent
617480472e
commit
7133dc5688
@ -83,11 +83,13 @@ export class HaChartBase extends LitElement {
|
|||||||
|
|
||||||
public disconnectedCallback() {
|
public disconnectedCallback() {
|
||||||
super.disconnectedCallback();
|
super.disconnectedCallback();
|
||||||
|
window.removeEventListener("scroll", this._handleScroll, true);
|
||||||
this._releaseCanvas();
|
this._releaseCanvas();
|
||||||
}
|
}
|
||||||
|
|
||||||
public connectedCallback() {
|
public connectedCallback() {
|
||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
|
window.addEventListener("scroll", this._handleScroll, true);
|
||||||
if (this.hasUpdated) {
|
if (this.hasUpdated) {
|
||||||
this._releaseCanvas();
|
this._releaseCanvas();
|
||||||
this._setupChart();
|
this._setupChart();
|
||||||
@ -561,6 +563,10 @@ export class HaChartBase extends LitElement {
|
|||||||
this.chart?.resetZoom();
|
this.chart?.resetZoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _handleScroll = () => {
|
||||||
|
this._tooltip = undefined;
|
||||||
|
};
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static get styles(): CSSResultGroup {
|
||||||
return css`
|
return css`
|
||||||
:host {
|
:host {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user