Readded the has_popup construction parameter that I erroniously removed on d74d5ca