-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Restore multi-select focus #3222
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3222 +/- ##
=========================================
+ Coverage 31.24% 31.3% +0.05%
=========================================
Files 222 222
Lines 6373 6380 +7
Branches 1136 1137 +1
=========================================
+ Hits 1991 1997 +6
- Misses 3679 3680 +1
Partials 703 703
Continue to review full report at Codecov.
|
I'm happy enough with this. My two concerns are: a) whether we want to focus the button. My argument is presented in #3194. Essentially, it just boils down to I think it's odd that we would be able to modify the selection while our focus is on a button. Other than that, I'm happy with this change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally this seemed strange to me as a prop for button, since focusing is an explicit action. It might be a small naming thing (autoFocus
? focusOnMount
?). Also, we're not respecting changes to the prop over the lifecycle of the button (componentDidUpdate
).
Still then it seems quite specific to the use-case of multi-selection and the block settings menu. Wondering if this should be handled by the componentDidMount
and componentDidUpdate
of BlockSettingsMenu
to focus the button. This would mean that the button component would either need to expose its underlying DOM node or that we use findDOMNode
to access the button by its ref, which are equally non-ideal.
Correct, I guess it would be better to rename to autofocus or something similar. |
Done via 3297. |
Description
This PR restores setting focus on a multi-select action after multi-selecting. Somehow this was all reverted in a few commits after redoing
BlockSettingsMenu
.A side effect of this is that the focus does not leave theDone in #3253.Editable
, which breaks deleting the multi-selection. Fixes #3191. See also #3194.How Has This Been Tested?
Checklist: