daggerheart/module/applications
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
..
characterCreation [Fix] Class Feature Change (#364) 2025-07-17 19:43:35 +02:00
dialogs Fix ctrl+clicking on a downtime action on macOS (#378) 2025-07-19 19:04:28 +02:00
hud Fixes tokenHUD import path (#348) 2025-07-15 16:15:58 +02:00
levelup actors datas max/total rework (#332) 2025-07-13 18:39:23 +02:00
settings [Fix] Downtime Rework (#367) 2025-07-17 19:48:59 -03:00
sheets [Fix] Downtime Rework (#367) 2025-07-17 19:48:59 -03:00
sheets-configs [Fix] Downtime Rework (#367) 2025-07-17 19:48:59 -03:00
ui Fix Damage chat message (#377) 2025-07-19 18:08:32 +02:00
ux Language Organization (#281) 2025-07-06 17:43:12 +02:00
_module.mjs Added a separation of system effects and generic effects on token status effects. Can be turned off in settings. (#317) 2025-07-11 16:53:22 -03:00