js/loader: ignore focus on autosubmitting elements
Autorefresh response is not rendered while your focus sits in a form. This is not so useful for autosubmitting elements, let's ignore them.
This commit is contained in:
parent
77a9dd1e6e
commit
6f19bb13b8
|
@ -629,7 +629,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var origFocus = document.activeElement;
|
var origFocus = document.activeElement;
|
||||||
if (typeof containerId !== 'undefined' && autorefresh && origFocus && $(origFocus).closest('form').length && $container.has($(origFocus)) && $(origFocus).closest('#' + containerId).length) {
|
if (typeof containerId !== 'undefined' && autorefresh && origFocus && $(origFocus).closest('form').length && $container.has($(origFocus)) && $(origFocus).closest('#' + containerId).length && ! $(origFocus).hasClass('autosubmit')) {
|
||||||
this.icinga.logger.debug('Not changing content, form has focus');
|
this.icinga.logger.debug('Not changing content, form has focus');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue