From 25d574f3de2ecab140928571b2a293b3f7d28d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8B=90=E5=8F=8B=20GXXP=20=26=20Miku?= Date: Tue, 24 Nov 2026 12:28:41 +0800 Subject: [PATCH] fix(web): keep trigger focus when closing member drawer via backdrop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevent the backdrop mousedown default from moving focus to body, so closing the drawer always restores focus to the 新增成员 trigger as the drawer contract requires. --- web/src/MembersSection.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/MembersSection.tsx b/web/src/MembersSection.tsx index 34a815f..56b5b69 100644 --- a/web/src/MembersSection.tsx +++ b/web/src/MembersSection.tsx @@ -306,7 +306,10 @@ export function MembersSection() {
{ - if (event.target === event.currentTarget) requestClose() + if (event.target !== event.currentTarget) return + // 阻止默认聚焦把焦点从触发按钮夺走:关闭后焦点必须回到「新增成员」。 + event.preventDefault() + requestClose() }} >