Skip to content

🐛 fix: socials input box unfocusing on input #140

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

Merged
merged 2 commits into from
Jul 15, 2025

Conversation

alettsy
Copy link
Contributor

@alettsy alettsy commented Jul 13, 2025

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Enhancement
  • Documentation Update

What I did

Hello, again!👋

I added memoization for the IconEditor component in the socials Editing panel so that it doesn't unnecessarily rebuild each time the input/value is changed of an icon's URL.

This fixes the issue where each time you type in one of the boxes, the UI rebuilds which then unfocuses the input box.

I also added memoization for the socials and socials_names so that they don't get updated when the event is triggered too, unless the length of the socials has changed, e.g. when a social is added/deleted.

This works on my local machine, but it would be great if someone could verify it actually fixes the issue on theirs too!

Please let me know if there are any issues! 😊

Commit description

The event CANVAS_EDIT_SECTION gets called every time the value of the social input box gets changed to update the UI, which updates the currently selected secton, which in turn updates the editor panel, causing the input boxes to unnecessarily refresh, thus unfocusing. Memoizing fixes these unnecessary rebuilds.

Fixes #139

The event CANVAS_EDIT_SECTION gets called every time the value of the social input box gets changed to update the UI, which updates the currently selected secton, which in turn updates the editor panel, causing the input boxes to unnecessarily refresh, thus unfocusing. Memoizing fixes these unnecessary rebuilds.

Fixes #139
Copy link

vercel bot commented Jul 13, 2025

@alettsy is attempting to deploy a commit to the Mauro de Souza's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Owner

@maurodesouza maurodesouza left a comment

Choose a reason for hiding this comment

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

Thanks @alettsy

@maurodesouza maurodesouza merged commit ab0f0a7 into maurodesouza:main Jul 15, 2025
1 of 2 checks passed
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.

[BUG]: Issue on typing urls for icons
2 participants