From d99d092784fbf28b59bf9a6e7027525cbf9a6259 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 9 Sep 2020 21:02:14 +0200 Subject: [PATCH] Enlarge touch target delete button (#6893) --- src/components/ha-sidebar.ts | 9 +++++---- src/resources/ha-sortable-style.ts | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts index d02c7bbd60..41d460fc9f 100644 --- a/src/components/ha-sidebar.ts +++ b/src/components/ha-sidebar.ts @@ -526,7 +526,7 @@ class HaSidebar extends LitElement { private async _hidePanel(ev: Event) { ev.preventDefault(); - const panel = (ev.target as any).panel; + const panel = (ev.currentTarget as any).panel; if (this._hiddenPanels.includes(panel)) { return; } @@ -692,12 +692,13 @@ class HaSidebar extends LitElement { : html``} ${title} ${this._editMode - ? html`` + > + + ` : ""} diff --git a/src/resources/ha-sortable-style.ts b/src/resources/ha-sortable-style.ts index 5751f54819..b6e3d377c5 100644 --- a/src/resources/ha-sortable-style.ts +++ b/src/resources/ha-sortable-style.ts @@ -57,7 +57,7 @@ export const sortableStyles = css` .hide-panel { display: none; position: absolute; - right: 8px; + right: 0; } :host([expanded]) .hide-panel {