LPS-42322 Adding clickoutside logic