Fix command mode & popup view bug

Added elements property to PopupView