Bug: Slider-valueBox should inherit its wantsKeyboardFocus from its owner Slider

I traverse hierarchical through all elements on my plugin GUI, to disable eating up transport shortcuts from the host via setWantsKeyboardFocus to false (happens in Reaper and Cubase)

(So the plugin is sill able to receive keyboard strokes if a label is edited and the slider is still editable through click etc..)

The problem is, changing a sliders colour re-enables the valueBox setWantsKeyboardsFocus to true because of this:

juce::Component::setWantsKeyboardFocus(bool wantsFocus) Line 2503	C++
juce::Label::setEditable(bool editOnSingleClick, bool editOnDoubleClick, bool lossOfFocusDiscards) Line 111	C++
juce::Slider::Pimpl::updateTextBoxEnablement() Line 577	C++
juce::Slider::Pimpl::lookAndFeelChanged(juce::LookAndFeel & lf) Line 595	C++
juce::Slider::lookAndFeelChanged() Line 1568	C++
juce::Slider::colourChanged() Line 1567	C++
juce::Component::setColour(int colourID, juce::Colour colour) Line 1904	C++

I want the valueBox to be editable, but without wantsKeyboardFocus, so it doesn’t eat up the start/stop “space” shortcut.

Here is a possible fix:

     void updateTextBoxEnablement()
     {
         if (valueBox != nullptr)
         {
             bool shouldBeEditable = editableText && owner.isEnabled();

             if (valueBox->isEditable() != shouldBeEditable) // (to avoid changing the single/double click flags unless we need to)
-                valueBox->setEditable (shouldBeEditable);
+            {
+                valueBox->setEditable(shouldBeEditable);
+                valueBox->setWantsKeyboardFocus(owner.getWantsKeyboardFocus()); //  If the slider doesn't want keyboard focus, the editor shouldn't want it either.
+            }
         }
     }