fix : focus on first input in popUp

instead of focusing on last input, focus on first input if exists or focus on last button.

RE : Issue #822

Signed-off-by: Justin Noel <github@calendee.com>