From 01072f67888d2b5abbf00cef05ba96b8cedfa40d Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Sat, 25 Jul 2026 15:45:14 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20Keep=20max-height=20at=20?= =?UTF-8?q?pixel=20value=20after=20open=20so=20close=20animates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- views/blocks/team-grid/team-grid.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/views/blocks/team-grid/team-grid.js b/views/blocks/team-grid/team-grid.js index 30eb725..3fac1a2 100644 --- a/views/blocks/team-grid/team-grid.js +++ b/views/blocks/team-grid/team-grid.js @@ -50,17 +50,11 @@ const animateOpen = (bioWrap) => { setMaxHeight(bioWrap, `${target}px`); }); - // After the transition completes, set max-height back to 'none' so - // dynamic content (e.g. images loading late) can grow the bio - // without being clipped. - const onEnd = (event) => { - if (event.propertyName !== 'max-height' || event.target !== bioWrap) { - return; - } - bioWrap.removeEventListener('transitionend', onEnd); - setMaxHeight(bioWrap, 'none'); - }; - bioWrap.addEventListener('transitionend', onEnd); + // After the transition completes, leave max-height at the measured + // pixel value. Resetting to 'none' breaks the close animation: the + // browser treats 'none' as a discrete keyword value and won't + // transition from it to a length. The pixel value gives the close + // animation a clean from-state to interpolate from. }; const animateClose = (bioWrap) => {