Menu: Fixed frontend menu 'Extended' option, resetting heights of wrapping containers not necessarily related to the menu itself (fixes #2025)

This commit is contained in:
Djamil Legato
2017-06-27 17:08:27 -07:00
parent 65752fe8eb
commit b4222951a9
3 changed files with 25 additions and 4 deletions
+12 -2
View File
@@ -259,7 +259,12 @@ var Menu = new prime({
if (isGoingBack) {
parents = parent.parents('[style^="height"]');
(parents || []).forEach(function(element) { element.style.height = heights.from.height + 'px'; });
(parents || []).forEach(function(element) {
element = $(element);
if (element.parent('.g-toplevel')) {
element[0].style.height = heights.from.height + 'px';
}
});
}
if (!isGoingBack) {
@@ -268,7 +273,12 @@ var Menu = new prime({
parent[0].style.height = height + 'px';
parents = parent.parents('[style^="height"]');
(parents || []).forEach(function(element) { element.style.height = height + 'px'; });
(parents || []).forEach(function(element) {
element = $(element);
if (element.parent('.g-toplevel')) {
element[0].style.height = height + 'px';
}
});
} else if (isNavMenu) {
sublevel[0].style.height = height + 'px';
}