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

Engine: Add event listener to disable right-click menu when there's a canvas element #12697

Merged
merged 3 commits into from
Jun 30, 2022
Merged

Engine: Add event listener to disable right-click menu when there's a canvas element #12697

merged 3 commits into from
Jun 30, 2022

Conversation

PolygonalSun
Copy link
Contributor

There was an issue found on the forums where the right-click context menu was appearing when a user used custom mouse controls. Upon closer investigation, it was determined that the reason the context menu didn't appear in other scenarios was that there was specific code to suppress it in all of our cameras' mouse input code. This proposed fix will add code to suppress the context menu when the rendering canvas is set to a non-null HTMLElement.

Forum Post: https://forum.babylonjs.com/t/even-by-using-evt-preventdefault-the-browser-menu-pops-up-after-i-changed-from-bjs-5-0-to-5-10/31383/8

@azure-pipelines
Copy link

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@azure-pipelines
Copy link

@azure-pipelines
Copy link

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@PolygonalSun PolygonalSun changed the title ThinEngine: Add event listener to disable right-click menu when there's a canvas element Engine: Add event listener to disable right-click menu when there's a canvas element Jun 30, 2022
@PolygonalSun PolygonalSun marked this pull request as ready for review June 30, 2022 01:23
@PolygonalSun PolygonalSun requested review from bghgary, deltakosh and sebavan and removed request for bghgary June 30, 2022 01:24
@azure-pipelines
Copy link

@deltakosh deltakosh enabled auto-merge (squash) June 30, 2022 14:34
@sebavan sebavan disabled auto-merge June 30, 2022 17:57
@sebavan sebavan enabled auto-merge June 30, 2022 17:57
@azure-pipelines
Copy link

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@azure-pipelines
Copy link

@azure-pipelines
Copy link

Visualization tests for webgl2 have failed. If some tests failed because the snapshots do not match, the report can be found at

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12697/merge/testResults/webgl2/index.html

If tests were successful afterwards, this report might not be available anymore.

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.

3 participants