daggerheart/module
George Brocklehurst 615df65415
Fix ctrl+clicking on a downtime action on macOS (#378)
* Refactor: handle button data attrs the same.

A small refactor to handle `button.dataset.move` (which was assigned to a
local const) and `button.dataset.category` (which was accessed directly)
in the same way by assigning them both to local consts.

* Fix right-click on downtime activities on macOS.

On macOS with a single-button mouse (e.g. a laptop trackpad) it's common to
trigger a right-click with ctrl+click.

In Chrome, this triggers both a `contextmenu` event and a regular `click`
event. In the context of downtime actions, this meant that we were
deselecting an action in the `contextmenu` handler but then immediately
re-selecting it again in the `click` handler.

This commit works around the problem by stopping the event from propagating
further. This fixes the bug, but also stops Foundry's default `contextmenu`
handler from firing and preventing the browser context menu from appearing,
so we also have prevent the event's default behaviour from firing.
2025-07-19 19:04:28 +02:00
..
applications Fix ctrl+clicking on a downtime action on macOS (#378) 2025-07-19 19:04:28 +02:00
canvas [Feature/Fixes] Adversary Touchups (#359) 2025-07-16 15:17:34 -03:00
config Feature/336 damage targeted resources (#376) 2025-07-19 15:48:50 +02:00
data Feature/336 damage targeted resources (#376) 2025-07-19 15:48:50 +02:00
dice Feature/336 damage targeted resources (#376) 2025-07-19 15:48:50 +02:00
documents Feature/336 damage targeted resources (#376) 2025-07-19 15:48:50 +02:00
enrichers Language Organization (#281) 2025-07-06 17:43:12 +02:00
helpers Feature/336 damage targeted resources (#376) 2025-07-19 15:48:50 +02:00
systemRegistration [Fix] Downtime Rework (#367) 2025-07-17 19:48:59 -03:00
_module.mjs File Structure Rework (#262) 2025-07-05 00:26:33 +02:00