mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Do not drop preselection in the navigation on reload
This commit is contained in:
parent
157818c8e7
commit
b7c207a9cb
@ -159,6 +159,12 @@
|
|||||||
$selectedMenu = $outerMenu;
|
$selectedMenu = $outerMenu;
|
||||||
}
|
}
|
||||||
$selectedMenu.addClass('active');
|
$selectedMenu.addClass('active');
|
||||||
|
} else {
|
||||||
|
// store menu state
|
||||||
|
var $menus = $('[role="navigation"] li.active', el);
|
||||||
|
if ($menus.size()) {
|
||||||
|
activeMenuId = $menus[0].id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -673,8 +673,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 && ! $(origFocus).hasClass('autosubmit')) {
|
if (
|
||||||
this.icinga.logger.debug('Not changing content, form has focus');
|
// Do not reload menu when search field has content
|
||||||
|
(containerId === 'menu' && $(origFocus).length && $(origFocus).val().length)
|
||||||
|
// TODO: remove once #7146 is solved
|
||||||
|
|| (containerId !== 'menu' && 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 for ', containerId, ' form has focus');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user