endlessm / kolibri-explore-plugin

The kolibri plugin to add the custom channel representation
MIT License
2 stars 4 forks source link

Context menu is no longer working anywhere #837

Open dylanmccall opened 12 months ago

dylanmccall commented 12 months ago

In #829, we added a change in the ContentModal component which prevents the context menu from appearing. According to #828, we should only be disabling the context menu inside that modal, but the change disabled the context menu everywhere.

In the current implementation, we are adding a listener for the "contextmenu" event to window. Based on the information at MDN, this event bubbles up from an element which was right clicked. So, instead of attaching the listener to window, we should add it to the modal container itself.