mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 17:24:16 +02:00
Re-render menu item after setting class to active
Force the browser to re-render the menu item, to update the link layout immediately by recreting the content html. fixes #7897
This commit is contained in:
parent
4cf8da4bb9
commit
3d07049fbf
@ -32,6 +32,15 @@
|
|||||||
if ($outerMenu.size()) {
|
if ($outerMenu.size()) {
|
||||||
$outerMenu.addClass('active');
|
$outerMenu.addClass('active');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Recreate the html content of the menu item to force the browser to update the layout, or else
|
||||||
|
the link would only be visible as active after another click or page reload in Gecko and WebKit.
|
||||||
|
|
||||||
|
fixes #7897
|
||||||
|
*/
|
||||||
|
$selectedMenu.html($selectedMenu.html());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// store menu state
|
// store menu state
|
||||||
var $menus = $('#menu li.active', el);
|
var $menus = $('#menu li.active', el);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user