It is as you want to interact with any other widget elements (e.g. buttons, …)
So the only condition is that your mouse cursor needs to be visible and your input mode should be either set to Game and UI or UI only.