From 98d37be0f614da4e1fb73e2ee3bb5bea437bcb5f Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Tue, 29 Mar 2016 09:39:34 +0200 Subject: Js: Prado.Element.focus: wait for all callbacks to finish before focusing the element --- framework/Web/Javascripts/source/prado/prado.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'framework/Web/Javascripts') diff --git a/framework/Web/Javascripts/source/prado/prado.js b/framework/Web/Javascripts/source/prado/prado.js index 793326b0..0a1c485d 100644 --- a/framework/Web/Javascripts/source/prado/prado.js +++ b/framework/Web/Javascripts/source/prado/prado.js @@ -446,7 +446,11 @@ Prado.Element = focus : function(element) { - setTimeout(function(){ jQuery("#"+element).focus(); }, 100); + jQuery(document).ajaxStop(function () { + setTimeout(function(){ + jQuery("#"+element).focus(); + }, 100); + }); }, /** -- cgit v1.2.3