From 80cc46667de5062e097f5cd6e51e74c40e5bb063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 12 Apr 2022 02:17:34 +0200 Subject: Fix edit popups not auto opening. Depending an the exact text of an translatable string seems like a bad idea. --- static/components/popup-element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static/components/popup-element.ts') diff --git a/static/components/popup-element.ts b/static/components/popup-element.ts index 35c966ac..3300f885 100644 --- a/static/components/popup-element.ts +++ b/static/components/popup-element.ts @@ -151,7 +151,7 @@ function setup_popup_element(ev: VEvent): PopupElement { ev.register(popup); /* TODO propper way to find popup container */ (document.querySelector('.days') as Element).appendChild(popup); - let tabBtn = popup.querySelector('[role="tab"][title="Redigera"]') as HTMLButtonElement + let tabBtn = popup.querySelector('[role="tab"][data-originaltitle="Edit"]') as HTMLButtonElement tabBtn.click() let tab = document.getElementById(tabBtn.getAttribute('aria-controls')!)! let input = tab.querySelector('input[name="summary"]') as HTMLInputElement -- cgit v1.2.3