EventSystem is not ready in OnEnable?

I am trying to set a UI Button as the active selected object when enabling a menu. The only way I know of for an object to catch when it has been activated is in OnEnable(). However, calling into the event system at that time does not seem to have any effect:
EventSystem.current.SetSelectedGameObject(myGameObject);

I have a workaround where in OnEnable() I set a flag, then in the objects Update() I check the flag and call SetSelectedGameObject() there and everything works ok. Seems like a bit of a hack though.

Is this expected behaviour? Does anyone have an explanation of what is happening with EventSystem here?

Have you tried setting it on Awake()?

I have also experience weird issues were some UI elements don’t seem to update when enabled/disable, but tossing them in Awake or sometimes on Start helps resolve the issue.