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

react-textfit on mobile renders very slowly #13

Closed
ataverascrespo opened this issue Dec 15, 2023 · 2 comments
Closed

react-textfit on mobile renders very slowly #13

ataverascrespo opened this issue Dec 15, 2023 · 2 comments

Comments

@ataverascrespo
Copy link
Owner

No description provided.

@ataverascrespo
Copy link
Owner Author

Forgot to add context to this one.

When using the app on desktop, the react-textfit component in the record view works as expected - it (to the best of it's ability) uses binary search to fit headlines and paragraphs into the header element space.

But on mobile browsers, it has a weird effect where as you scroll up and down the page, the text gets bigger and bigger, eventually filling the space. This is tied to malte-wessel/react-textfit#62, where it seems that the browsers URL bar is causing the entire page to snap, causing the element to resize.

On PWAs, where the URL bar is not present, the textfit component is not even rendering properly. I'll have to look into the react-textfit code

@ataverascrespo
Copy link
Owner Author

Well, can't say I didn't try, but react-textfit is extremely deprecated and not amazingly documented. I'm removing the textfit component for screens under 768px width. Unfortunate to lose such a cool feature but not worth the hassle on mobile :(

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

No branches or pull requests

1 participant