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 toolbar button state bug #110

Merged
merged 2 commits into from
Aug 10, 2022
Merged

Fix toolbar button state bug #110

merged 2 commits into from
Aug 10, 2022

Conversation

gpoitch
Copy link
Collaborator

@gpoitch gpoitch commented Aug 10, 2022

The toolbar button state wasn't always correctly updated.
To reproduce, type some letters then bold a few and click in and out of the bold markup text. The bold button state did not turn off when clicking out.

This was due to reusing the outer-scoped variable which was actually adding "active" multiple times so removing 1 didn't remove all of them. The browser only ever shows 1 but it you log the className you could see "active active active...". The whole component could use a cleanup but wanted to show the minimal fix first.

@gpoitch gpoitch merged commit a1ed52c into master Aug 10, 2022
@gpoitch gpoitch deleted the gp/toolbar-state-fix branch August 10, 2022 13:53
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.

1 participant