mirror of
https://github.com/discourse/discourse.git
synced 2025-02-17 06:42:44 +08:00
FIX: Menu panel position adjustment (#15358)
This commit is contained in:
parent
40d1bbab5d
commit
973c9bdcd3
|
@ -338,11 +338,7 @@ const SiteHeaderComponent = MountWidget.extend(
|
|||
}
|
||||
|
||||
const windowWidth = document.body.offsetWidth;
|
||||
const headerWidth =
|
||||
document.querySelector("#main-outlet .container").offsetWidth || 1100;
|
||||
const remaining = (windowWidth - headerWidth) / 2;
|
||||
const viewMode =
|
||||
this.site.mobileView || remaining < 50 ? "slide-in" : "drop-down";
|
||||
const viewMode = this.site.mobileView ? "slide-in" : "drop-down";
|
||||
|
||||
menuPanels.forEach((panel) => {
|
||||
const headerCloak = document.querySelector(".header-cloak");
|
||||
|
|
Loading…
Reference in New Issue
Block a user