Skip to content

Commit

Permalink
bugfix: ordering of stores
Browse files Browse the repository at this point in the history
  • Loading branch information
ericeoeur committed Feb 12, 2025
1 parent 20c473b commit 3ba014c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions blocks/footer/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ footer .footer p {
list-style-position: inside;
}

.storeview-selection > li {
margin-bottom: var(--spacing-small);
}

.storeview-multiple-stores > ul {
position: relative;
width: 100%;
Expand Down
6 changes: 4 additions & 2 deletions blocks/footer/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ export default async function decorate(block) {
if (storeRegion.children.length <= 1) {
li.classList.add('storeview-single-store');
const ulParent = li.closest('ul');
ulParent.removeChild(li);
ulParent.appendChild(storeRegion.firstElementChild).className = 'storeview-single-store';
const replacedChild = (storeRegion.firstElementChild);
replacedChild.className = 'storeview-single-store';

ulParent.replaceChild(replacedChild, li);
ulParent.setAttribute('tabindex', '0');
} else {
li.classList.add('storeview-multiple-stores');
Expand Down

0 comments on commit 3ba014c

Please sign in to comment.