Makes sure that the confirm dialog is triggered only for visible input fields.

Signed-off-by: Marc Delisle <marc@infomarc.info>