From 4e09d5f331fb2a0b6b07b5dcfae9d87a4945b128 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 13 Mar 2023 21:28:21 +1030 Subject: [PATCH] fix(modal): prevent scroll on focus trap (de)activation --- src/modal/modal.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modal/modal.ts b/src/modal/modal.ts index 2f7cfc6..fd4cf19 100644 --- a/src/modal/modal.ts +++ b/src/modal/modal.ts @@ -42,6 +42,7 @@ export default class ModalElement extends HTMLElement { this.focusTrap = createFocusTrap(this, { escapeDeactivates: false, allowOutsideClick: true, + preventScroll: true, }); }