diff --git a/less/v2/character.less b/less/v2/character.less index c218236065..cc901f95ad 100644 --- a/less/v2/character.less +++ b/less/v2/character.less @@ -797,7 +797,7 @@ &:hover:not(:has(a:hover)) { box-shadow: 0 0 12px var(--dnd5e-color-gold); } } - &.empty { + &.empty:not(.disabled) { cursor: pointer; transition: opacity 250ms ease; &:hover { opacity: .5; } diff --git a/module/applications/actor/character-sheet-2.mjs b/module/applications/actor/character-sheet-2.mjs index 7d95a80bb1..d878c10ab0 100644 --- a/module/applications/actor/character-sheet-2.mjs +++ b/module/applications/actor/character-sheet-2.mjs @@ -323,6 +323,10 @@ export default class ActorSheet5eCharacter2 extends ActorSheetV2Mixin(ActorSheet if ( this._mode === this.constructor.MODES.EDIT ) { html.find(".tab.details .item-action").on("click", this._onItemAction.bind(this)); } + + if ( !this.isEditable ) { + html[0].querySelectorAll('[data-action="findItem"]').forEach(el => el.classList.add("disabled")); + } } /* -------------------------------------------- */ @@ -481,6 +485,7 @@ export default class ActorSheet5eCharacter2 extends ActorSheetV2Mixin(ActorSheet * @protected */ async _onFindItem(type, { classIdentifier }={}) { + if ( !this.isEditable ) return; const filters = { locked: { types: new Set([type]) } }; if ( classIdentifier ) filters.locked.additional = { class: { [classIdentifier]: 1 } }; const result = await CompendiumBrowser.selectOne({ filters });