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

Right click on viewer opens context menu #1526

Open
Mr-Kanister opened this issue Jan 2, 2025 · 2 comments
Open

Right click on viewer opens context menu #1526

Mr-Kanister opened this issue Jan 2, 2025 · 2 comments
Labels
Milestone

Comments

@Mr-Kanister
Copy link

Describe the bug

If one right clicks on the viewer, the browser context menu opens. Only if one closes this at the same spot with a right click, a right-click-event gets fired. If one moves the mouse instead, the viewer rotates with it.

Correct me if I'm wrong, but I believe, this wasn't always the case. I have a running 5.5.2 instance, where the context menu doesn't open and the event gets fired immediately. I can't remember to have done anything in order to create this behaviour.

In the fiddle below, I attached a click event listener on the viewer which prints if the click was a right click or not.

I couldn't get a new instance with 5.5 running in JSFiddle, otherwise I would have loved to show the difference...

Online demo URL

https://jsfiddle.net/ztsd43c1/

Photo Sphere Viewer version

5.11.4

Plugins loaded

No response

OS & browser

Debian 12, Firefox 128.5.0esr / Chrome 131.0.6778.204

Additional context

No response

@Mr-Kanister Mr-Kanister added the bug label Jan 2, 2025
@mistic100
Copy link
Owner

I might be because you once use the markers plugin

https://github.com/mistic100/Photo-Sphere-Viewer/blob/main/packages/markers-plugin/src/MarkersPlugin.ts#L256-L258

I'll see what can be done to generalize this.

@mistic100 mistic100 added this to the 5.11.5 milestone Jan 2, 2025
@Mr-Kanister
Copy link
Author

Mr-Kanister commented Jan 2, 2025

But with the markers plugin it's exactly the same, isn't it?

https://photo-sphere-viewer.js.org/plugins/markers.html#example

Edit: only when clicking on a marker, the event gets catched

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants