From b66654787c8088eb58aa25032c6ea49fcb66df09 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Thu, 21 Jan 2021 17:59:16 +0000 Subject: [PATCH] make whole invite clickable to expand --- ts/modules/invites.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ts/modules/invites.ts b/ts/modules/invites.ts index 9a2080a..1fdee91 100644 --- a/ts/modules/invites.ts +++ b/ts/modules/invites.ts @@ -263,6 +263,11 @@ export class DOMInvite implements Invite { const toggle = (this._infoArea.querySelector("input.inv-toggle-details") as HTMLInputElement); toggle.onchange = () => { this.expanded = !this.expanded; }; + this._header.onclick = (event: Event) => { + if (event.target == this._header) { + this.expanded = !this.expanded; + } + }; this._details = document.createElement('div') as HTMLDivElement; this._container.appendChild(this._details);