Skip to content

Commit c5d828d

Browse files
committed
fix: hide sidebar tooltip on touchend events
1 parent be31950 commit c5d828d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/components/ha-sidebar.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ class HaSidebar extends SubscribeMixin(LitElement) {
206206

207207
private _mouseLeaveTimeout?: number;
208208

209+
private _touchendTimeout?: number;
210+
209211
private _tooltipHideTimeout?: number;
210212

211213
private _recentKeydownActiveUntil = 0;
@@ -419,6 +421,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
419421
class="ha-scrollbar"
420422
@focusin=${this._listboxFocusIn}
421423
@focusout=${this._listboxFocusOut}
424+
@touchend=${this._listboxTouchend}
422425
@scroll=${this._listboxScroll}
423426
@keydown=${this._listboxKeydown}
424427
>
@@ -645,6 +648,13 @@ class HaSidebar extends SubscribeMixin(LitElement) {
645648
this._hideTooltip();
646649
}
647650

651+
private _listboxTouchend() {
652+
clearTimeout(this._touchendTimeout);
653+
this._touchendTimeout = window.setTimeout(() => {
654+
this._hideTooltip();
655+
}, 1000);
656+
}
657+
648658
@eventOptions({
649659
passive: true,
650660
})

0 commit comments

Comments
 (0)