Problem
In Sculpting Mode when click RMB and click RMB in Strength many options stay disabled. (T69200)
Solution
Change region where activebut will be searched for the ui_context_button_active function.
Set region where but is active before call ui_popup_context_menu_for_button in ui_do_button function.
Description
This happens because the WM_operator_poll_context function in UI_block_end_ex return false when invoke
some functions poll (ex.: copy_data_path_button_poll, copy_as_driver_button_poll, reset_default_button_poll) that
call UI_context_active_but_prop_get returning a activebut out of popup menu.
When checking code sequence:
uiBut *UI_context_active_but_prop_get(const bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, int *r_index)
static uiBut *ui_context_rna_button_active(const bContext *C)
return ui_context_button_active(CTX_wm_region(C), ui_context_rna_button_active_test);
the CTX_wm_region(C) function return a different region from where clicked at the mouse.