From b9e8821114775bfa13f799afded67b8975199044 Mon Sep 17 00:00:00 2001 From: Maurice Date: Tue, 1 Sep 2026 14:44:48 +0200 Subject: [PATCH] fix(dashboard): no press-scale on composite trip cards (#2158) --- client/src/pages/DashboardPage.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/src/pages/DashboardPage.tsx b/client/src/pages/DashboardPage.tsx index 28076ad6d..0f3370c13 100644 --- a/client/src/pages/DashboardPage.tsx +++ b/client/src/pages/DashboardPage.tsx @@ -417,6 +417,9 @@ function BoardingPassHero({ trip, bundle, locale, onOpen, onEdit, onCopy, onArch className="hero-trip" onClick={onOpen} role="button" + // No press-scale on composite cards: shrinking the surface mid-click slides + // the inner menu buttons out from under the pointer (#2158). + data-no-press tabIndex={0} onKeyDown={(e) => { if (e.target === e.currentTarget && (e.key === 'Enter' || e.key === ' ')) { e.preventDefault(); onOpen() } }} > @@ -596,6 +599,8 @@ function TripCard({ trip, locale, badges, onOpen, onEdit, onCopy, onArchive, onD className="trip-card" onClick={onOpen} role="button" + // Same press-scale opt-out as the hero card (#2158). + data-no-press tabIndex={0} onKeyDown={(e) => { if (e.target === e.currentTarget && (e.key === 'Enter' || e.key === ' ')) { e.preventDefault(); onOpen() } }} > @@ -841,7 +846,7 @@ function UpcomingTool({ items, locale, onOpen }: { const moment = MOMENT_LABEL[r.type] return (
onOpen(r.trip_id)} - role="button" tabIndex={0} + role="button" data-no-press tabIndex={0} onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onOpen(r.trip_id) } }}>
{dateStr?.d ?? '–'}
{dateStr?.m ?? ''}