[ui] fixed setupDom() for hidden elements (fixes #263)