Skip to content

Conversation

@Christopher-Hayes
Copy link
Contributor

Description

When a drag on the image preview (the "modal media preview carousel") begins, check if the mouse right-click button is down. If it is down, prevent the carousel drag behavior.

This is to fix the issue where you right-click on an image to show the browser right-click menu, but the carousel thinks you're now dragging the carousel.

Videos

The video below first shows the bug on the current stable build. And then it shows the behavior on the dev build with the new code. The image is no longer dragged on right-click.

Screencast.From.2025-04-14.14-59-51.mp4
  • Tested
  • Linted

Fixes #3264

Misc Notes

Vertical dragging should probably be supressed, as well as dragging when there is only a single media component. But, to keep this PR focused, I did not try to fix those UX quirks.

@netlify
Copy link

netlify bot commented Apr 14, 2025

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit af7da14
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/67fd611772044a000858319a
😎 Deploy Preview https://deploy-preview-3265--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Apr 14, 2025

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit af7da14
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/67fd61174d253400084fe7d1

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.

Right-click on image preview starts dragging image

1 participant