Fix saving scroll position in actor sheets

This commit is contained in:
Johannes Loher 2021-02-20 02:12:34 +01:00
parent 622253f0da
commit d31c9ac24b
4 changed files with 12 additions and 8 deletions

View file

@ -16,7 +16,14 @@ export class DS4ActorSheet extends ActorSheet<ActorSheet.Data<DS4Actor>> {
classes: ["ds4", "sheet", "actor"],
width: 745,
height: 600,
scrollY: [".sheet-body"],
scrollY: [
".inventory",
".spells",
".talents-abilities",
".profile",
".biography",
".special-creature-abilities",
],
template: superDefaultOptions.template,
viewPermission: superDefaultOptions.viewPermission,
closeOnSubmit: superDefaultOptions.closeOnSubmit,

View file

@ -8,14 +8,11 @@
}
.sheet-body {
overflow-y: auto;
overflow-y: hidden;
}
.tab {
height: 100%;
overflow-y: auto;
align-content: flex-start;
ol {
overflow-y: auto;
}
}
}

View file

@ -58,7 +58,7 @@
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="inventory">{{localize 'DS4.HeadingInventory'}}</a>
<a class="item" data-tab="special-creature-abilites">{{localize 'DS4.HeadingSpecialCreatureAbilites'}}</a>
<a class="item" data-tab="special-creature-abilities">{{localize 'DS4.HeadingSpecialCreatureAbilites'}}</a>
<a class="item" data-tab="spells">{{localize 'DS4.HeadingSpells'}}</a>
<a class="item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
</nav>

View file

@ -51,7 +51,7 @@
{{!-- ======================================================================== --}}
<div class="tab special-creature-abilites" data-group="primary" data-tab="special-creature-abilites">
<div class="tab special-creature-abilities" data-group="primary" data-tab="special-creature-abilities">
<ol class="items-list">
{{> baseItemListHeader dataType='specialCreatureAbility' }}
{{#each itemsByType.specialCreatureAbility as |item id|}}
@ -59,4 +59,4 @@
{{/each}}
</ol>
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='specialCreatureAbility' }}
</div>
</div>