Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PivotControls - preventDefault onContext & operate controls only with button 0 #1926

Closed
romankoho opened this issue Apr 18, 2024 · 2 comments
Labels
enhancement New feature or request Stale Inactive issue

Comments

@romankoho
Copy link
Contributor

Describe the feature you'd like:

I'm using PivotControls in a scene with OrbitControls. It happens that I'm close to the control but want to pan the OrbitControls with a right click. In such cases, the browser opens a default menu. I would prefer no reaction on the right (context) click.

pivotControls - onContext

Moreover, I think it is more intuitive if the PivotControls can only be operated with mouse button 0 (left button)

Suggested implementation:

In the single components , , , the event needs to cancel the default behavior:

 onContextMenu={(e) => {
          e.nativeEvent.preventDefault()
  }}

moreover, I would add the check for button = 0 in the onPointerDown event

onPointerDown={(e) => {
          if (e.button !== 0) {
            return
          }
          onPointerDown(e)
        }}
Copy link

Thank you for contributing! We’re marking this issue as stale as a gentle reminder to revisit it and give it the attention it needs to move forward.

Any activity, like adding an update or comment, will automatically remove the stale label so it stays on our radar.

Feel free to reach out on Discord if you need support or feedback from the community. This issue will close automatically soon if there’s no further activity. Thank you for understanding and for being part of the project!

@github-actions github-actions bot added the Stale Inactive issue label Oct 30, 2024
Copy link

github-actions bot commented Nov 8, 2024

We’re closing this issue to keep our project manageable and make room for other active work, but we truly appreciate your effort and contribution.

If you’d like to continue working on this, please feel free to re-open it or reach out on Discord — our community is always ready to support you. Thanks again for helping us stay organized and for understanding our approach!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale Inactive issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant