Revert "Fix: type of popup was read from "type" attribute of target element by mistake, closes #316"

This reverts commit 4063d85fe0a80f83102e5dca16906f59e67a7e04.