diff --git a/_javascript/modules/components/toc/toc-mobile.js b/_javascript/modules/components/toc/toc-mobile.js index 48b372d..8d717dd 100644 --- a/_javascript/modules/components/toc/toc-mobile.js +++ b/_javascript/modules/components/toc/toc-mobile.js @@ -62,7 +62,11 @@ export class TocMobile { activeItem.scrollIntoView({ block: 'center' }); } - static hidePopup() { + static hidePopup(event) { + if (event?.type === 'cancel') { + event.preventDefault(); + } + if (!$popup.open) { return; }