polimediaupv / paella-core

Paella Player core library
Educational Community License v2.0
20 stars 15 forks source link

Popup menu positions aren't fixed to their trigger buttons #368

Closed owi92 closed 6 days ago

owi92 commented 2 months ago

As the title says, the menus are moving when scrolling, but I would expect them to be anchored to their trigger button. While this was noticed in Tobira, I can also reproduce this on the https://paellaplayer.upv.es/ website:

https://github.com/polimediaupv/paella-core/assets/94838646/b3900695-72a5-4e84-99c0-a35cabf19819

I'm pretty sure the css and js for this are in paella-core/src/css/PopUp.css and paella-core/src/js/core/PopUp.js respectively, so this should be the right repository to report this in, but please let me know if I am mistaken.

owi92 commented 1 month ago

Thank you for the fix @ferserc1. There is still an issue related to this: When scrolling down before opening the menu, it appears a little too high:

https://github.com/user-attachments/assets/ff5d574d-ebe8-4c7e-ae03-659d24391976

LukasKalbertodt commented 1 month ago

@miesgre Can you reopen this issue? See Ole's previous comment: the "fix" made popup menus arguably worse, so we cannot update Paella in Tobira beyond 1.49.3.

ferserc1 commented 2 weeks ago

This issue should be fixed in version 1.49.5. You can test it on the paella player website:

https://paellaplayer.upv.es/#/demos

owi92 commented 2 weeks ago

@ferserc1 Sorry to bother you again with this, but the issue I shared in https://github.com/polimediaupv/paella-core/issues/368#issuecomment-2242547612 still persists. It's not super obvious on the demo page you linked because there you can't scroll down that far.

If you test this on the playground page (https://paellaplayer.upv.es/#/playground), you will notice that the popup menu will still be opened in the wrong place somewhere above the actual trigger button. You just need to scroll down until the player is cut off at the top before opening the menu.

Bildschirmfoto 2024-09-03 um 11 17 29
ferserc1 commented 1 week ago

I think I have identified the problem. When opening a pop up it determines the horizontal/vertical and top/bottom quadrant where the pop up is to be opened. It seems that the problem lies in the calculation of the position when the pop up is in the upper quadrant.

The problem is that I am not managing to replicate the bug directly in paella-core, even though I am adding spacers before and after the player. In this case the positions are always calculated correctly. I have yet to identify why on the paella player website it fails.

karendolan commented 1 week ago

I can also duplicate the issue from Chrome in https://paellaplayer.upv.es/#/playground when I click the settings button when the page is scrolled down to cut off the top of the video. But, I cannot duplicate it on our site's iFramed videos. I wonder if it's related to the partially hidden player being embedded in a div element vs iFrame?

ferserc1 commented 6 days ago

That's clear, it was a rather silly bug that is very hard to find.

It should be fixed in tag 1.49.6. To test it, you have to open a pop up so that the plugin button is above the top half of the window. It happened in all browsers, because it was a bug due to a wrong variable name.