From: Janusz Dobrowolski Date: Fri, 4 Jul 2008 21:32:33 +0000 (+0000) Subject: Fixed focus after ajax page reload X-Git-Tag: v2.4.2~19^2~1942 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=a06949eb560d8d165c267069ee73d34059e68985;p=fa-stable.git Fixed focus after ajax page reload --- diff --git a/includes/ajax.inc b/includes/ajax.inc index c07bea68..135ee03d 100644 --- a/includes/ajax.inc +++ b/includes/ajax.inc @@ -114,7 +114,13 @@ class Ajax extends JsHttpRequest { } else if($com['n'] == 'up' && $com['t'] == '_page_body') { - $this->aCommands = array($com); + $cmds = array($com); + foreach( $this->aCommands as $k=> $cmd) { + if ($cmd['n'] == 'fc') { // save focus + $cmds[] = $cmd; break; + } + } + $this->aCommands = $cmds; break; } }