BetterNPCSheet5e
BetterNPCSheet5e copied to clipboard
[Bug] Sheet skill broken
On every NPC sheet I open/create, I cannot check a skill. Some function also no longer works, like Special Traits which no longer opens anything.
I can still use the sheet (using the compendium), but I can no longer change/edit skills (and/or other function like Special Traits)
I launched a game with BetterNPCSheet5e only and faced the same problem.
Also seem to be getting this issue when attempting to add skills to NPCs using BetterNPCSheet. I've tested this in a clean 0.8.9 world with no other modules active (Running 5e 1.43 version). The console output when trying to check a skill box is as follows:
base.js:682 Uncaught TypeError: Cannot read properties of null (reading 'parentElement')
[Detected 1 package: system:dnd5e]
at BetterNPCActor5eSheet._onCycleSkillProficiency (base.js:682)
at HTMLAnchorElement.dispatch (jquery.min.js:2)
at HTMLAnchorElement.v.handle (jquery.min.js:2)
_onCycleSkillProficiency @ base.js:682
dispatch @ jquery.min.js:2
v.handle @ jquery.min.js:2
Got the same thing as well
Uncaught TypeError: Cannot read properties of null (reading 'parentElement')
[Detected 1 package: system:dnd5e]
at BetterNPCActor5eSheet._onCycleSkillProficiency (base.js:682)
at HTMLAnchorElement.dispatch (jquery.min.js:2)
at HTMLAnchorElement.v.handle (jquery.min.js:2)
In npc-sheet.html, the line:
<input class='hidable-attr' type="hidden" name="data.skills.{{s}}.value" value="{{skill.value}}" data-dtype="Number" />
needs to be moved up four lines, so that it is before
<a class="skill-proficiency show-on-edit " title="{{skill.hover}}">{{{skill.icon}}}</a>
The base class from Foundry is expecting to find that element there.
Fixed in pull request.