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

Move keydown handler for sl-drawer back to base div #1459

Merged
merged 2 commits into from
Jul 18, 2023

Conversation

grncdr
Copy link
Contributor

@grncdr grncdr commented Jul 18, 2023

This restores the stacking behaviour of drawers.

See discussion from #1457


The first change broke a test case that expects an <sl-drawer open> can be closed by pressing Escape. Looking back at #925, I've opted to fix this by focusing the drawers panel element if the drawer is open the first time it updates. In the case of drawers that are dynamically opened, the existing code already focuses the drawer panel.

@vercel
Copy link

vercel bot commented Jul 18, 2023

@grncdr is attempting to deploy a commit to the Font Awesome Team on Vercel.

A member of the Team first needs to authorize it.

@claviska
Copy link
Member

TODO: if we proceed with this approach, we will need to update <sl-dialog> as well.

@vercel
Copy link

vercel bot commented Jul 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
shoelace ✅ Ready (Inspect) Visit Preview Jul 18, 2023 3:54pm

Copy link
Member

@claviska claviska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'm going to apply the same changes to <sl-dialog> since they work almost identically and I'll update the changelog.

@claviska claviska merged commit 1e243e4 into shoelace-style:next Jul 18, 2023
@claviska
Copy link
Member

I've opted to fix this by focusing the drawers panel element if the drawer is open the first time it updates.

Whoops, this wasn't a good fix because it only runs the first time the drawer is connected + updated, plus the test was still failing locally for me for some reason.

I reverted this one for now. I think there's a way to do what you're trying to as-is, so let me try to whip up a working example before we go any further here.

claviska added a commit that referenced this pull request Jul 18, 2023
@grncdr grncdr deleted the feature-stack-drawers branch August 3, 2023 14:04
circular-semantic-release bot pushed a commit to circular-o/circular that referenced this pull request Aug 4, 2023
# [1.7.0-next.1](v1.6.0...v1.7.0-next.1) (2023-08-04)

### Bug Fixes

* valueAsDate now falls back to native implementation ([shoelace-style#1399](https://github.com/circular-o/circular/issues/1399)) ([a4f0ae9](a4f0ae9))

### Features

* **details:** use details and summary html tag to enable in browser searching ([shoelace-style#1470](https://github.com/circular-o/circular/issues/1470)) ([89f0f4a](89f0f4a))
* Syncs Shoelace next branch ([3b66b01](3b66b01))
* Syncs Shoelace next branch ([0999b51](0999b51))
* Syncs Shoelace next branch ([5e50390](5e50390))

### Reverts

* Revert "Move keydown handler for sl-drawer back to base div (shoelace-style#1459)" ([f954233](f954233)), closes [shoelace-style#1459](https://github.com/circular-o/circular/issues/1459)
circular-semantic-release bot pushed a commit to circular-o/circular that referenced this pull request Aug 4, 2023
# [1.7.0](v1.6.0...v1.7.0) (2023-08-04)

### Bug Fixes

* valueAsDate now falls back to native implementation ([shoelace-style#1399](https://github.com/circular-o/circular/issues/1399)) ([a4f0ae9](a4f0ae9))

### Features

* **details:** use details and summary html tag to enable in browser searching ([shoelace-style#1470](https://github.com/circular-o/circular/issues/1470)) ([89f0f4a](89f0f4a))
* Syncs Shoelace next branch ([3b66b01](3b66b01))
* Syncs Shoelace next branch ([0999b51](0999b51))
* Syncs Shoelace next branch ([5e50390](5e50390))

### Reverts

* Revert "Move keydown handler for sl-drawer back to base div (shoelace-style#1459)" ([f954233](f954233)), closes [shoelace-style#1459](https://github.com/circular-o/circular/issues/1459)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants