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:
Thomas Gelf 2014-06-23 14:02:18 +02:00
parent 77a9dd1e6e
commit 6f19bb13b8
1 changed files with 1 additions and 1 deletions

View File

@ -629,7 +629,7 @@
}
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');
return;
}