From 4eeeffc4931850627ef9756ebb615b05f22af81f Mon Sep 17 00:00:00 2001 From: Cory LaViska <cory@abeautifulsite.net> Date: Wed, 24 Feb 2021 07:14:24 -0500 Subject: [PATCH] Fix drawer overlay click --- docs/getting-started/changelog.md | 3 ++- src/components/drawer/drawer.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/getting-started/changelog.md b/docs/getting-started/changelog.md index 0063bd70..ab9c03fa 100644 --- a/docs/getting-started/changelog.md +++ b/docs/getting-started/changelog.md @@ -8,7 +8,8 @@ _During the beta period, these restrictions may be relaxed in the event of a mis ## Next -- Fixed bug where `sl-checkbox`, `sl-radio`, and `sl-switch` controls would shrink with long labels [#325](https://github.com/shoelace-style/shoelace/issues/325) +- Fixed a bug where `sl-checkbox`, `sl-radio`, and `sl-switch` controls would shrink with long labels [#325](https://github.com/shoelace-style/shoelace/issues/325) +- Fixed a bug where ignoring clicks and clicking the overlay would prevent the escape key from closing the dialog/drawer [#344](https://github.com/shoelace-style/shoelace/pull/344) ## 2.0.0-beta.27 diff --git a/src/components/drawer/drawer.tsx b/src/components/drawer/drawer.tsx index 61d72403..1d06e824 100644 --- a/src/components/drawer/drawer.tsx +++ b/src/components/drawer/drawer.tsx @@ -246,7 +246,7 @@ export class Drawer { onKeyDown={this.handleKeyDown} onTransitionEnd={this.handleTransitionEnd} > - <div part="overlay" class="drawer__overlay" onClick={this.handleOverlayClick} /> + <div part="overlay" class="drawer__overlay" onClick={this.handleOverlayClick} tabIndex={-1} /> <div ref={el => (this.panel = el)}