Skip to content

Commit

Permalink
fix(interface): 🐛 don't transitively show .advanced-options elements
Browse files Browse the repository at this point in the history
if a parent element/tile is an advanced option, don't toggle it's display

ie, the only way an advanced option can be shown is directly by AdvancedOptions
  • Loading branch information
JamesNZL committed Jul 20, 2022
1 parent 7dbd3d5 commit eb196dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/elements/Element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ export class Element {

if (!this.element.parentElement) return;

if (Element.isSomeChildShown(this.element.parentElement)) {
if (Element.isSomeChildShown(this.element.parentElement) && !this.element.parentElement.classList.contains('advanced-options')) {
this.element.parentElement.classList.remove('hidden');
}

if (!this.tile || !Element.isSomeChildShown(this.tile)) return;
if (!this.tile || !Element.isSomeChildShown(this.tile) || this.tile.classList.contains('advanced-options')) return;

this.tile.classList.remove('hidden');

Expand Down

0 comments on commit eb196dc

Please sign in to comment.