Make return button also work in non-popup mode