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

Fix truncated focus #1821

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

michaltarasiuk
Copy link
Contributor

I removed the overflow-hidden class from the AnimatedSizeContainer component. After reviewing its usage, I did not find any display issues.

Before:
Screenshot 2024-12-21 at 21 49 18
After:
Screenshot 2024-12-21 at 21 50 38

Copy link

vercel bot commented Dec 21, 2024

@michaltarasiuk is attempting to deploy a commit to the Dub Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Dec 21, 2024

CLA assistant check
All committers have signed the CLA.

@steven-tey
Copy link
Collaborator

Sorry I don't see the issue here – what's wrong with the current input otp implementation?

@michaltarasiuk
Copy link
Contributor Author

The issue with the current implementation is that the focus indicator is partially truncated when the user interacts with the OTP input field. This happens because the overflow-hidden class in the AnimatedSizeContainer prevents elements that extend beyond the container’s boundaries from being fully visible.

By removing the overflow-hidden class, the focus indicator is now fully visible, which resolves this problem.

@steven-tey Let me know if this clarifies the issue!

Copy link
Collaborator

@TWilson023 TWilson023 left a comment

Choose a reason for hiding this comment

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

I don't think we'll be able to remove overflow-hidden from AnimatedSizeContainer, because we don't want content to overflow while the container is still expanding.

Here's what happens when we remove the overflow-hidden (slowed down to help demonstrate):

CleanShot.2025-01-06.at.16.51.22.mp4

Instead, we may just need to play around with paddings/margins to get this focus ring to fit within the overflow-hidden container.

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.

4 participants