[ui/popup] Fix events handling (fixes #44)