Overlay mode is enabled by adding popup property and calling toggle function of the menu ref with an event of the target.