JS: Ignore autosubmit elements in the form behavior
This commit is contained in:
parent
9f79f9a48b
commit
c963ee23ff
|
@ -81,16 +81,12 @@
|
||||||
if (changed) {
|
if (changed) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (
|
if ($container.has(origFocus).length
|
||||||
// is the focus among the elements to be replaced?
|
&& autorefresh
|
||||||
$container.has(origFocus).length &&
|
&& $(origFocus).length
|
||||||
// is an autorefresh
|
&& ! $(origFocus).hasClass('autofocus')
|
||||||
autorefresh &&
|
&& ! $(origFocus).hasClass('autosubmit')
|
||||||
|
&& $(origFocus).closest('form').length
|
||||||
// and has focus
|
|
||||||
$(origFocus).length &&
|
|
||||||
!$(origFocus).hasClass('autofocus') &&
|
|
||||||
$(origFocus).closest('form').length
|
|
||||||
) {
|
) {
|
||||||
icinga.logger.debug('Not changing content for ' + containerId + ' form has focus');
|
icinga.logger.debug('Not changing content for ' + containerId + ' form has focus');
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue