Skip to content

Commit 5f14acd

Browse files
committed
Fix v13 scene controls: add activeTool, remove stale layer property
The v13 getSceneControlButtons hook uses keyed objects instead of arrays. Control groups need activeTool set to avoid errors when switching controls (foundryvtt/foundryvtt#12803), and the v12 `layer` property is no longer used. https://claude.ai/code/session_01QTAfGutqiUt2bJE1EdPVA2
1 parent 26c34aa commit 5f14acd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/module.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,14 @@ Hooks.on('getSceneControlButtons', (controls) => {
111111
}],
112112
});
113113
} else {
114+
// v13 requires activeTool even for button-only controls, and does not
115+
// use the v12 `layer` property. See foundryvtt/foundryvtt#12803.
114116
controls['chronicle-sync'] = {
115117
name: 'chronicle-sync',
116118
title: 'Chronicle Sync',
117119
icon: 'fa-solid fa-rotate',
118-
layer: 'controls',
119120
visible: true,
121+
activeTool: 'dashboard',
120122
tools: {
121123
dashboard: {
122124
name: 'dashboard',

0 commit comments

Comments
 (0)