Skip to content

fix: product image zoom requires multiple clicks to dismiss#16946

Draft
posthog[bot] wants to merge 1 commit into
masterfrom
posthog-code/fix-product-image-zoom-dismiss
Draft

fix: product image zoom requires multiple clicks to dismiss#16946
posthog[bot] wants to merge 1 commit into
masterfrom
posthog-code/fix-product-image-zoom-dismiss

Conversation

@posthog
Copy link
Copy Markdown
Contributor

@posthog posthog Bot commented May 20, 2026

Changes

ProductImage in src/components/Products/Slides/Image.tsx wrapped <ZoomImage> (a react-medium-image-zoom instance) inside a <button>. When a user clicked to dismiss the zoom overlay, react-medium-image-zoom closed it — but the same click bubbled up to the outer <button>, which immediately re-opened the zoom. Users had to click multiple times to actually close the overlay.

PostHog session 019e4776-70ae-7628-9805-40a7f5a806cb (segment 00:35–01:36 on /surveys) captured this as a $dead_click plus two $rageclick events while the user tried to dismiss a feature-slide image.

This replaces the redundant <button> wrapper with a <div>, preserving the flex items-center justify-center w-full styling. ZoomImage already renders its own clickable trigger, so no interactivity is lost.

Affects every product slide page (surveys, feature flags, etc.) via FeaturesSlide, FeaturesSplit, FeaturesSplitWithImage, and FeaturesGrid.

Checklist

  • I've read the docs and/or content style guides.
  • Words are spelled using American English
  • Use relative URLs for internal links
  • I've checked the pages added or changed in the Vercel preview build
  • If I moved a page, I added a redirect in vercel.json (n/a)

Created with PostHog Code

The outer <button> around <ZoomImage> in ProductImage caught the dismiss
click from react-medium-image-zoom and immediately re-opened the zoom,
forcing users to click again to close. Replace it with a plain <div>
since ZoomImage already renders its own clickable trigger.

Generated-By: PostHog Code
Task-Id: 2744d014-24ed-4e55-8304-58a5b1c1dc50
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview May 20, 2026 10:54PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants