modxcms / revolution

MODX Revolution - Content Management Framework
https://modx.com/
GNU General Public License v2.0
1.36k stars 529 forks source link

Resource media browser context menu [bug] #14170

Closed kolbykruger closed 5 years ago

kolbykruger commented 5 years ago

Summary

When right clicking to get a context menu in the modx media browser in list view, the context menu's position is located in the same place every time. The location is not relative to the cursor.

Step to reproduce

Open the MODX media browser, select list view, click a folder to show some files/images, and right click on any of them to get the popup context menu.

Observed behavior

The context menu appears, but it is not positioned correctly.

Expected behavior

The context menu should be relative to the cursor's position when right-clicking.

Environment

MODX 2.6.5 and 2.7.0 (tested on both).

Screenshot for more context

untitled

JoshuaLuckers commented 5 years ago

I can confirm this issue. It seems that the position of the contextmenu is related to the width of the element where the right click is triggered on.

tolanych commented 5 years ago

This bug isset also in 3.x, but this solution incompatible with it. In 3.x bug redeclared and located at file /assets/modext/widgets/media/modx.browser.js

https://github.com/modxcms/revolution/blob/3.x/manager/assets/modext/widgets/media/modx.browser.js#L452

alroniks commented 5 years ago

Closing it as PR is merged.