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 editor loses focus when toggling list if list item empty #3483

Merged
merged 3 commits into from
Oct 15, 2024
Merged

Fix editor loses focus when toggling list if list item empty #3483

merged 3 commits into from
Oct 15, 2024

Conversation

cything
Copy link
Contributor

@cything cything commented Oct 7, 2024

Fixes #3338

I tried to fix the issue with #3465. Can you please check if this works?

@dae
Copy link
Member

dae commented Oct 11, 2024

It does appear to work, but I'm a little worried about unintentional side-effects, as the focus handling change is not limited to the list buttons. Perhaps instead of changing focus(), we could do the blur/focus only when toggling list state, by e.g. making a new CommandIconButton for that case?

@hikaru-y @abdnh any thoughts?

@abdnh
Copy link
Collaborator

abdnh commented Oct 14, 2024

This pattern is used in refocus() and it doesn't seem to be causing any issues.

@dae
Copy link
Member

dae commented Oct 15, 2024

Ok, let's see how we go. Thank you both!

@dae dae merged commit 8f4cab6 into ankitects:main Oct 15, 2024
1 check 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.

Toggling list items currently loses editor focus when empty item
3 participants