From d17889e0004bce7b59d3d8977bd8ef417fba0ea4 Mon Sep 17 00:00:00 2001 From: minhaz Date: Sat, 19 Apr 2014 10:45:16 -0400 Subject: [PATCH] Makes sure that the confirm dialog is triggered only for visible input fields. Signed-off-by: Marc Delisle --- js/ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ajax.js b/js/ajax.js index 361f000e32..f3ae14e1dd 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -164,7 +164,7 @@ var AJAX = { //sometime we accidently click on a url,refresh button or back button //operation to confirm if user want to leave page in such cases var foundFieldNotEmpty = false; - $("input[type='text']").each(function(index){ + $("input[type='text']:visible").each(function(index){ if ($(this).val().length > 0) { foundFieldNotEmpty = true; }