Update: It happens to all players on various browsers, with any character sheet, every time I click "Show to Players". They aren't using any pop-up blockers or ad blockers, beyond default Chrome, FF, Edge configurations. The custom sheet uses a tabbed structure to segment content. They can see the tabs on the sheet and click them, but the tab contents are empty. Again, it works fine if *they* open the sheet.
Below are the relevant code snippets. Maybe someone more experienced than me with custom sheet code might see something that could explain the above issue. Or perhaps a handout opened w. "Show to Players" has a different wrapper/process than one opened directly by the local user and that's conflicting with the approach used in the jscript and CSS.
Top-level div that displays the tabs at the top of the sheet:
<div class='button-panel'>
<input type='hidden' class='buttonstoggle' name='attr_sheetButtons' value='overview'/>
<button type='action' class='btnOverview' name='act_overview' >Overview</button>
<button type='action' class='btnClass' name='act_class' >Class</button>
<button type='action' class='btnSkills' name='act_skills' >Skills</button>
<button type='action' class='btnCombat' name='act_combat' >Combat</button>
<button type='action' class='btnEquipment' name='act_equipment' >Equipment</button>
<button type='action' class='btnHirelings' name='act_hirelings' >Hirelings</button>
<button type='action' class='btnJournal' name='act_journal' >Journal</button>
<button type='action' class='btnSettings' name='act_settings' >Settings</button>
<div class='whispertoggle'><label>Whisper Toggle: </label><input type='checkbox' name='attr_toggle_whisper' /><input type='hidden' name='attr_whispertoggle'/></div>
</div>
<input type='hidden' class='tabstoggle' name='attr_sheetTab' value='overview'/>
Then, each section is contained in a top-level div, like this:
<div class='overview'>
stuff...
</div>
Here's the button handler in the sheet:
// Button panel event handlers
const buttonlist = ['overview','combat','skills','equipment','class','hirelings','journal','settings'];
buttonlist.forEach(button => {
on(`clicked:${button}`, function() {
setAttrs({
sheetButtons: button,
sheetTab: button
});
});
});// Button panel event handlers
const buttonlist = ['overview','combat','skills','equipment','class','hirelings','journal','settings'];
buttonlist.forEach(button => {
on(`clicked:${button}`, function() {
setAttrs({
sheetButtons: button,
sheetTab: button
});
});
});
Here's the related CSS:
.button-panel {
padding-bottom: 15px;
}
.overview,
.combat,
.skills,
.equipment,
.class,
.hirelings,
.journal,
.settings {
display: none;
}
.tabstoggle[value='overview'] ~ div.overview,
.tabstoggle[value='combat'] ~ div.combat,
.tabstoggle[value='skills'] ~ div.skills,
.tabstoggle[value='equipment'] ~ div.equipment,
.tabstoggle[value='class'] ~ div.class,
.tabstoggle[value='hirelings'] ~ div.hirelings,
.tabstoggle[value='settings'] ~ div.settings,
.tabstoggle[value='journal'] ~ div.journal {
display: block;
}
.btnOverview,
.btnCombat,
.btnSkills,
.btnEquipment,
.btnClass,
.btnHirelings,
.btnJournal,
.btnSettings {
background-color: lightgray;
font-weight: bold;
}
.buttonstoggle[value='overview'] ~ button.btnOverview,
.buttonstoggle[value='combat'] ~ button.btnCombat,
.buttonstoggle[value='skills'] ~ button.btnSkills,
.buttonstoggle[value='equipment'] ~ button.btnEquipment,
.buttonstoggle[value='class'] ~ button.btnClass,
.buttonstoggle[value='hirelings'] ~ button.btnHirelings,
.buttonstoggle[value='journal'] ~ button.btnJournal,
.buttonstoggle[value='settings'] ~ button.btnSettings {
background-color: white;
}