fix: prevent toolbox categories from becoming unselected#233
fix: prevent toolbox categories from becoming unselected#233gonfunko merged 1 commit intomodern-blocklyfrom
Conversation
|
The description says "even if focus moves somewhere else," but the implementation leaves selection in place only if there is no new selection. What am I missing? |
|
"Focus" is probably a bit of a misnomer, the behavior I was seeing was clicking in the flyout/workspace caused the toolbox category to lose its selection highlight. By returning false when asked if it's OK to deselect a category without a replacement, that behavior is prevented. |
|
In looking at RaspberryPiFoundation/blockly#9126 I think this is actually a ~regression in core; it's now the case that, when the toolbox loses focus, it deselects its selected category. I don't think it should do that; I think that category should just become passively focused? But also want to run that by Ben. Moving this to draft and punting on 9126 until he's back. |
9ea0bee to
2551018
Compare
This ensures that a toolbox category is always displayed as selected, even if focus moves somewhere else.