Skip to content

Commit

Permalink
Allow use of search inputs by observers on non-editable actor sheets (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
stwlam authored Feb 25, 2025
1 parent 16778be commit 09e8166
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/module/actor/sheet/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,15 @@ abstract class ActorSheetPF2e<TActor extends ActorPF2e> extends ActorSheet<TActo
})();
this.#activateInventoryDragDrop(inventoryPanel);

// Allow use of search inputs when sheet is not editable
if (!this.isEditable && this.actor.testUserPermission(game.user, "OBSERVER")) {
for (const input of html.querySelectorAll<HTMLInputElement>("input[type=search]")) {
input.disabled = false;
}
}

// Everything below here is only needed if the sheet is editable
if (!this.options.editable) return;
if (!this.isEditable) return;

// Handlers for number inputs of properties subject to modification by AE-like rules elements
const manualPropertyInputs = htmlQueryAll<HTMLInputElement | HTMLSelectElement>(
Expand Down

0 comments on commit 09e8166

Please sign in to comment.