js: Don't force focus in multipart updates if focus isn't affected
This commit is contained in:
parent
1f77414a93
commit
4ce9165f77
|
@ -767,12 +767,20 @@
|
||||||
if (!! match) {
|
if (!! match) {
|
||||||
var $target = $('#' + match[1]);
|
var $target = $('#' + match[1]);
|
||||||
if ($target.length) {
|
if ($target.length) {
|
||||||
|
var forceFocus;
|
||||||
|
if (req.forceFocus
|
||||||
|
&& typeof req.forceFocus.jquery !== 'undefined'
|
||||||
|
&& $.contains($target[0], req.forceFocus[0])
|
||||||
|
) {
|
||||||
|
forceFocus = req.forceFocus;
|
||||||
|
}
|
||||||
|
|
||||||
_this.renderContentToContainer(
|
_this.renderContentToContainer(
|
||||||
match[2],
|
match[2],
|
||||||
$target,
|
$target,
|
||||||
'replace',
|
'replace',
|
||||||
req.autorefresh,
|
req.autorefresh,
|
||||||
req.forceFocus,
|
forceFocus,
|
||||||
autoSubmit,
|
autoSubmit,
|
||||||
req.scripted
|
req.scripted
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue