popup: Add ability to specify z-index

close #894