ghostClick fix. Prevent selecting input if clicking an overlay that will be closed as a result of the click.