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

find dropdown root using trigger.parentElement #675

Conversation

Aierie
Copy link

@Aierie Aierie commented Oct 3, 2022

This should fix #583

will-destroy can run at the same tick as dropdown content removal. If it is indeed removed from the DOM, we would not be able to find the container by starting from the dropdown content, so this PR uses the trigger to find the container instead.

It seems difficult to test this - I've tried using paused animations (but this doesn't play nice with waitForAnimations which only waits for a running animation), however I'd be happy to implement suggestions.

- will-destroy can run at the same tick as dropdown content removal
@Aierie
Copy link
Author

Aierie commented Oct 3, 2022

Closing this for now - realised that the named block isn't strict about where you render your dropdown content, so this may mess up behaviour of some dropdowns.

@Aierie Aierie closed this Oct 3, 2022
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.

Animation only plays for initial open of dropdown
1 participant