Popup mode is enabled by adding popup property and calling toggle method with an event of the target.