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

Throttle updating on browser's animation frame #4

Merged
merged 1 commit into from
Mar 27, 2020

Conversation

rndmerle
Copy link
Contributor

Hello.

Thanks for this component, it's working really well. Better than the one we were using before.

I've spotted a minor issue:
On Chrome 71, using autoresize prop on a clamped text, the first time I resize the browser a "ResizeObserver loop limit exceeded" Javascript error/message is issued, without any stacktrace. Then there is no message anymore. The component is still working, despite the message;

You can try it by adding

window.onerror = (error) => console.log(error)

There is no issue on Firefox.

Throttling the updates on the browser's animation frame ensures it's updated at most at 60 FPS.

@Justineo
Copy link
Owner

Thanks!

@Justineo Justineo merged commit 73dafd1 into Justineo:master Mar 27, 2020
@Justineo
Copy link
Owner

Unfortunately I'm reverting this because delaying updates into RAF seems to cause flickering.

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.

None yet

2 participants