mistic100 / Photo-Sphere-Viewer

A JavaScript library to display 360° sphere panoramas.
https://photo-sphere-viewer.js.org
MIT License
1.93k stars 686 forks source link

Dragg event keeps triggered on windows after keydown on some situations #1483

Open jgarnie opened 2 days ago

jgarnie commented 2 days ago

Describe your problem

Hello and hope someone can point me on the right direction here: We have an aplication that renders a set of images, then we have the option to trigger photosphere for a 360 view, we then add a container on top of the images with an instance of photosphere and allow the user to move around in the 360view, we have noticed after updating the library from 5.1 to 5.10.0 seems the behaviour of the drag on windows devices is different and now it seems the dragged cursor effect still active over the 360view, this makes the view to follow the cursor around the 360view, we have noticed that once this is happening, if the user clicks again on the 360 view, there is interaction with the elements behind the 360 view(image below) creating this ghosty appearence of the elements over the 360view, which is something we dont want, is there a way to prevent this from happening?, meaning that the cursor should only move the view when is dragging active and no having the default grabbed state that makes the view to follow the cursor around the vehicle.

As said before this seems to happen only on windows devices.

image

thanks a lot in advance and hope is somehow clear what I am trying to point out.

Online demo URL

No response

Photo Sphere Viewer version

5.10.0

Plugins loaded

No response

Additional context

No response

mistic100 commented 2 days ago

Cannot help without a proper demo.

jgarnie commented 1 day ago

hi @mistic100, thanks for your quick reply, here is a demo with the issue: link, to reproduce:

-windows device only -click on 'interior' in the bottom right option to access photosphere -dragg and drop several times until the cursor will get stuck on sort of 'grabbing' state under photosphere, once this happens when user clicks again to grab the interior view background images will be grabbed instead as in the image in the first comment.

thanks again for your time and hope you can support

mistic100 commented 21 hours ago

I played with it for a good 5 minutes on both Firefox and Chrome and cannot reproduce the behavior you describe.

Anyway I guess it would be a good idea to hide your external viewer when photo sphere viewer is active

jgarnie commented 7 hours ago

Hi @mistic100 , hidding the component behind is not something we can do at the moment, we encountered some other issues when implementing that approach that made us try to find what the problem is when rendering photosphere. there is a video spotting what the issue is at the moment, maybe it helps to understand, seems the mouse keeps dragging on photosphere itself, only reproducible in windows, more noticeable with a mouse

https://github.com/user-attachments/assets/48200870-af44-4f06-8997-da137ec2de0b