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

Ensure backdrop cleanup is performed #4873

Merged
merged 1 commit into from
Jul 30, 2024
Merged

Conversation

bearfriend
Copy link
Contributor

@bearfriend bearfriend commented Jul 29, 2024

GAUD-6698: d2l-backdrop does not always clean up after itself

@bearfriend bearfriend requested a review from a team as a code owner July 29, 2024 21:37
Copy link
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-4873/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

@@ -123,6 +124,7 @@ class Backdrop extends LitElement {
if (!reduceMotion && !this.noAnimateHide && isVisible(this)) {
this.addEventListener('transitionend', hide, { once: true });
this._state = 'hiding';
setTimeout(() => this._state === 'hiding' && hide(), TRANSITION_DURATION + 100);
Copy link
Member

Choose a reason for hiding this comment

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

So was transitionend just not firing in all cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, thought I filled out the description more. Yeah it just doesn't fire, which is really weird. As far as I can tell transitioncancel also doesn't fire. The only thing I can think is there's some weird combo of low-CPU but also hardware acceleration going on where the timing just gets weird.

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha. There are likely a few other places where we do this, but they probably don't have such dire consequences if they're missed.

@bearfriend bearfriend merged commit ab7bffa into main Jul 30, 2024
6 checks passed
@bearfriend bearfriend deleted the dgleckler/backdrop-hide branch July 30, 2024 13:54
Copy link

🎉 This PR is included in version 3.27.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants