From 926287d5bac1e1c9f58143611ad725e8324cfdac Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Wed, 20 Nov 2013 21:32:47 +0100 Subject: Fixed TControl::focus() --- framework/Web/UI/TClientScriptManager.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'framework/Web/UI') diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index 80a71ea0..a9f6c5b4 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -340,11 +340,10 @@ class TClientScriptManager extends TApplicationComponent */ public function registerFocusControl($target) { - $this->registerPradoScriptInternal('effects'); + $this->registerPradoScriptInternal('jquery'); if($target instanceof TControl) $target=$target->getClientID(); - $id = TJavaScript::quoteString($target); - $this->_endScripts['prado:focus'] = 'new Effect.ScrollTo('.$id.'); Prado.Element.focus('.$id.');'; + $this->_endScripts['prado:focus'] = 'new Prado.Element.scrollTo(\''.$target.'\'); jQuery(\'#'.$target.'\').focus();'; $params=func_get_args(); $this->_page->registerCachingAction('Page.ClientScript','registerFocusControl',$params); -- cgit v1.2.3