mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Fixed so that users can access sceneEnvironments if they have permissions
This commit is contained in:
parent
ec0b0df02e
commit
503aa712e6
2 changed files with 17 additions and 6 deletions
|
|
@ -96,11 +96,11 @@ export default class DHContextMenu extends foundry.applications.ux.ContextMenu {
|
|||
* Trigger a context menu event in response to a normal click on a additional options button.
|
||||
* @param {PointerEvent} event
|
||||
*/
|
||||
static triggerContextMenu(event) {
|
||||
static triggerContextMenu(event, altSelector) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
const { clientX, clientY } = event;
|
||||
const selector = '[data-item-uuid]';
|
||||
const selector = altSelector ?? '[data-item-uuid]';
|
||||
const target = event.target.closest(selector) ?? event.currentTarget.closest(selector);
|
||||
target?.dispatchEvent(
|
||||
new PointerEvent('contextmenu', {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue