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()) {
|
||||
$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 {
|
||||
// store menu state
|
||||
var $menus = $('#menu li.active', el);
|
||||
|
|
Loading…
Reference in New Issue