-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
collapse: remove overflow hidden even if height does not match perfect #4203
Merged
calebporzio
merged 1 commit into
alpinejs:main
from
gehrisandro:fix-collapse-not-removing-overflow-hidden
May 13, 2024
Merged
collapse: remove overflow hidden even if height does not match perfect #4203
calebporzio
merged 1 commit into
alpinejs:main
from
gehrisandro:fix-collapse-not-removing-overflow-hidden
May 13, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I believe it has to do with the fact that function is called at multiple steps, but not totally sure. I think there are more modern features that can make this actually much easier and simpler, but won't satisfy older targets (Animation API, Animating Grid Rows). |
Thanks! |
Thank you for merging 🚀 |
I encountered the same issue today and can confirm that this PR fixes it. Thank you @gehrisandro! |
This was referenced Jun 13, 2024
Open
Open
Open
Open
Open
Open
Open
This was referenced Jun 21, 2024
Open
Open
Open
Open
Open
Open
This was referenced Jun 29, 2024
Open
Open
This was referenced Sep 10, 2024
Open
Open
Open
Open
Open
Open
This was referenced Sep 17, 2024
Open
Open
Open
Open
Open
Open
This was referenced Sep 24, 2024
Open
Open
Open
Open
Open
Open
This was referenced Oct 1, 2024
Open
Open
Open
Open
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sometimes it happens, that the
overflow: hidden
style remains on the element after it has expanded.The reason is, that there is a condition checking that the element height as reached the full height, but sometimes the values do not match perfectly. For example,
full
is100.5
butel.getBoundingClientRect().height
returns100.4765625
.This PR changes the condition to allow a difference up to 1px.
To be honest, I am not sure, if the condition is necessary at all.