The current implementation of Offcanvas does not allow you to opt out of the keyboard control (aka, pressing ESC closes the offcanvas).
It is called keyboard within the Bootstrap Offcanvas options.
It seems the functionality would be pretty simple to add—I can contribute the changes if I find a moment.
The current implementation of Offcanvas does not allow you to opt out of the keyboard control (aka, pressing ESC closes the offcanvas). It is called
keyboard
within the Bootstrap Offcanvas options.It seems the functionality would be pretty simple to add—I can contribute the changes if I find a moment.
Work Effort
export let keyboard = true;
toOffcanvas.svelte
Offcanvas.d.ts
to have thekeyboard: boolean
prop.Offcanvas.svelte
to only add thebodyEvent
event listener ifkeyboard
istrue
.