Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support keyboard option of Offcanvas #561

Open
RoryDuncan opened this issue Jul 10, 2023 · 0 comments
Open

Support keyboard option of Offcanvas #561

RoryDuncan opened this issue Jul 10, 2023 · 0 comments
Labels
Priority: Low Bug, issue, or pull request is a P3 Severity: Low Bug or issue is of low severity Type: Feature A new feature or functionality Type: Proposal Issue or pull requests contains a new proposal

Comments

@RoryDuncan
Copy link

RoryDuncan commented Jul 10, 2023

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

  1. Add export let keyboard = true; to Offcanvas.svelte
  2. Update Offcanvas.d.ts to have the keyboard: boolean prop.
  3. Update Offcanvas.svelte to only add the bodyEvent event listener if keyboard is true.
@dysfunc dysfunc added Priority: Low Bug, issue, or pull request is a P3 Severity: Low Bug or issue is of low severity Type: Proposal Issue or pull requests contains a new proposal Type: Feature A new feature or functionality labels Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Bug, issue, or pull request is a P3 Severity: Low Bug or issue is of low severity Type: Feature A new feature or functionality Type: Proposal Issue or pull requests contains a new proposal
Projects
None yet
Development

No branches or pull requests

2 participants